Skip to content

Instantly share code, notes, and snippets.

@Larusso
Last active December 21, 2015 19:09
Show Gist options
  • Save Larusso/6352431 to your computer and use it in GitHub Desktop.
Save Larusso/6352431 to your computer and use it in GitHub Desktop.
this little alias will output the last commit hash committed by the current git user usage: git last-commit // will output the last commit hash in current branch git last-commit --all // will output the last commit hash in repository
git config --global alias.last-commit '!sh -c "git log -1 --pretty=tformat:\"%H\" --author=\"`git config user.name`\" $*"' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment