Skip to content

Instantly share code, notes, and snippets.

@eddiemoya
Last active February 23, 2023 00:29
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save eddiemoya/5215886 to your computer and use it in GitHub Desktop.
##
# 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)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"
@mattwr18
Copy link

Thanks 😻

@bcimbali
Copy link

bcimbali commented Aug 3, 2022

Nice, thanks! 🙌

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