Skip to content

Instantly share code, notes, and snippets.

@dacook
Forked from ecasilla/pretty git history
Last active May 5, 2016 06: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 dacook/7eddd0c97b2844cc9157ba2e2f0470bd to your computer and use it in GitHub Desktop.
Save dacook/7eddd0c97b2844cc9157ba2e2f0470bd to your computer and use it in GitHub Desktop.
git-hist
##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)%ad%C(reset) %C(green)%h%C(reset) %C(red)%an%C(reset): %s %C(blue)%d%C(reset)' --graph --date=short"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment