Skip to content

Instantly share code, notes, and snippets.

@miebach
Last active February 22, 2022 05:25
Show Gist options
  • Save miebach/6b33a9a83057bf055102 to your computer and use it in GitHub Desktop.
Save miebach/6b33a9a83057bf055102 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