Skip to content

Instantly share code, notes, and snippets.

@brianshumate
Last active December 17, 2015 20:49
Show Gist options
  • Save brianshumate/5670692 to your computer and use it in GitHub Desktop.
Save brianshumate/5670692 to your computer and use it in GitHub Desktop.
Git Tips

Various and sundry tips for making git and GitHub usage more pleasant with optional rainbows and sunshine.

Gist

  • Use the gist command line utility for working with gists.

Hub

  • Use the hub command line utility to interact with GitHub with little need to visit the website in a browser.

Prettified Log Output

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

or add to global git configuration as the alias git lg:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Source

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