Last active
August 29, 2015 13:57
-
-
Save polarblau/9594287 to your computer and use it in GitHub Desktop.
Amend a commit with same message by default.
This file contains 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
function gfix { | |
DEFAULT_MESSAGE=$(git log -1 HEAD --pretty-format:%s) | |
MESSAGE=${1:-$DEFAULT_MESSAGE} | |
git commit --amend -m "$MESSAGE" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment