Git Product home page Git Product logo

git-rmsg's Introduction

git rmsg

This is a simple script which makes it easier for me to batch-rewrite the first lines of my commit messags.

Usage

$ git rmsg SHA

This will pop up your $EDITOR with the first lines of commit messages of the commits between SHA and HEAD. Edit that file, changing each commit's name to the desired name, and exit your editor. git rmsg will then rewrite history, changing the name of each of these commits to the name you provided.

Lines following the first line in each commit message will be preserved without changes.

Part N rewriting

If your commit message contains the string "Part N", it will be rewritten to contain the correct part number. For example if you write the commit messages:

Bug 100 - Part N: Cheese
Bug 100 - Part N: Pear
Bug 100 - Part N: Apple
Bug 100 - Part N: Coconut

The messages will be rewritten to:

Bug 100 - Part 4: Cheese
Bug 100 - Part 3: Pear
Bug 100 - Part 2: Apple
Bug 100 - Part 1: Coconut

How it Works

The script generates a small python script which will look up, based on the commit message passed over stdin, the commit message you wrote. It will then pass this script as an msg-filter to git filter-branch.

git-rmsg's People

Contributors

mystor avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.