Skip to content

Instantly share code, notes, and snippets.

@vanenshi
Last active December 30, 2022 06:46
Show Gist options
  • Save vanenshi/c0293d9357c9010b37431664b9af30ac to your computer and use it in GitHub Desktop.
Save vanenshi/c0293d9357c9010b37431664b9af30ac to your computer and use it in GitHub Desktop.
Git alias for pretty graph

just run the following command in your terminal

git config --global alias.graph "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all"

now with the following command you can see the git log as a colorized graph

git graph

source: Visualizing branch topology in Git

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