Skip to content

Instantly share code, notes, and snippets.

@rlee287
Created January 3, 2016 18:47
Show Gist options
  • Save rlee287/2696009a81191464adce to your computer and use it in GitHub Desktop.
Save rlee287/2696009a81191464adce to your computer and use it in GitHub Desktop.
Useful Git Aliases
git config --global alias.hist log --oneline --graph --date-order --decorate --all
git config --global alias.hist-auth log --branches --pretty=format:'%C(yellow) %h %C(magenta)%<(20)%an %C(green bold)%G? %C(blue nobold)%>>(16)%GK%Creset%<(24,trunc) %aD'
git config --global alias.commit-info log --stat -1
[alias]
#Create a gitk style graph
hist = log --oneline --graph --date-order --decorate --all
#Quickly see the author, timestamp, and GPG signature status on a range of commits
hist-auth = log --branches --pretty=format:'%C(yellow) %h %C(magenta)%<(20)%an %C(green bold)%G? %C(blue nobold)%>>(16)%GK%Creset%<(24,trunc) %aD'
#Create a status diff for a particular commit
commit-info = log --stat -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment