Created
June 26, 2012 06:14
-
-
Save dpwright/2993701 to your computer and use it in GitHub Desktop.
Git alias to amend a specific commit earlier in the tree
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
amend-commit = "!f() { START=`(git symbolic-ref -q HEAD || git rev-parse HEAD) | cut -d"/" -f 3`; git checkout -q $1 && git commit --amend && git rebase --onto HEAD $1 $START; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍