Created
April 21, 2016 13:30
-
-
Save Zitrax/fe01e7422817f4ba377348bac56afd10 to your computer and use it in GitHub Desktop.
Fixup git alias
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
fixup = !sh -c 'git commit -a --fixup=`git rev-list master.. | tail -1` && git commit --amend -m\"`git show -s --format=%s`\" -m\"$1\"' - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something I need to do often in my git workflow is to add a fixup commit that fixes up the first commit on the branch and add a description in the body of the fixup commit message.
Thus this alias do the following:
Usage:
git fixup "Removed debug print"