Skip to content

Instantly share code, notes, and snippets.

@joshuaflanagan
Created December 1, 2011 02:02
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 joshuaflanagan/1412771 to your computer and use it in GitHub Desktop.
Save joshuaflanagan/1412771 to your computer and use it in GitHub Desktop.
Git aliases
# add to your ~/.gitconfig
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@jmeridth
Copy link

jmeridth commented Dec 1, 2011

It's easier to not edit the config directly, IMO. Use:
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"

Mine are at http://bit.ly/gitconfigsetup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment