Skip to content

Instantly share code, notes, and snippets.

@ZevEisenberg
Last active December 24, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZevEisenberg/6801538 to your computer and use it in GitHub Desktop.
Save ZevEisenberg/6801538 to your computer and use it in GitHub Desktop.
Copies full log of the last git commit to the clipboard (and displays it, too)
# this is useful for lots of git-related functions
alias returnIfNotGitRepo='if isGitRepo; then; ; else echo "No repositories here."; return 1; fi'
function glastcommit
{
returnIfNotGitRepo
git show --name-only
git show --name-only | pbcopy
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment