Last Updated: February 25, 2016
·
286
· nobbz

Show some simple git branch graph on terminal

Just pop up a terminal window and hack the following into it (Thats a single line!):

$ git config --global alias.graph "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold cyan)%h%C(reset) - %C(green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n  %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"

From now on, you have the command git graph available which gives you a nicely formatted graph on the terminal. Since it is displayed through your $PAGER it is easily scrollable, and maybe even searchable.