Skip to content

Instantly share code, notes, and snippets.

@ntung
Forked from miebach/git-log-pretty
Created May 15, 2020 16:22
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 ntung/bdd580162548f36f1d4f5bfbc600fa32 to your computer and use it in GitHub Desktop.
Save ntung/bdd580162548f36f1d4f5bfbc600fa32 to your computer and use it in GitHub Desktop.
pretty git log graph with coloured branches
# Visualizing branch topology in git on the commandline
git log --graph --oneline --full-history --all
git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"
# With colors in Bash:
git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
# thanks to Pavel Shved: http://stackoverflow.com/a/1838938
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment