Two Helpful Git Aliases
Software
Tuesday, 22 November 2011 14:10

Add this to your ~/.gitconfig to add these two super useful aliases. A guy at work shared these with me. The provide a nice way to view your history on the command line in a much more pretty format. Mainly they add some color and add visualization of branching and merging.

[alias]
        hist = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an>%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s' --graph
        histfull = log --pretty=format:'%Cred%h%Creset %C(bold blue)<%an>%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s%n' --graph --name-status

blog comments powered by Disqus