Created
October 26, 2011 19:29
-
-
Save erithmetic/1317513 to your computer and use it in GitHub Desktop.
git amend
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
#!/bin/bash | |
if [ "$1" == "" ] | |
then | |
msg=`git log -n 1 --format=oneline | sed 's/^[0-9a-f]*[ ]//'` | |
else | |
msg="$1" | |
fi | |
git commit -m "$msg" --amend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment