Created
December 21, 2010 17:22
-
-
Save jtrim/750240 to your computer and use it in GitHub Desktop.
Bash function to echo the latest git commit in oneline format and copy the SHA1 to your clipboard under OSX
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 glast() { | |
LATEST=`git log --oneline -n 1` | |
echo -n $LATEST | ack '^([a-zA-Z0-9]*) {1}' --output='$1' | pbcopy | |
echo $LATEST | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment