mlozoa
Last Updated: February 25, 2016
·
1.527K
· dmichaelavila
Photo

git graph

git

Add the following to your ~/.gitconfig to view your git "graph":

You may need to create ~/.gitconfig

[alias]                                                                                                                                                   
    graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%aN>%Creset'                                     

With your git configured this way you can run git graph in a repository to view a graph like the following, taken from the open source project boardroom:

Picture

Grouping relevant commits in git is valuable. Doing so in such a way that does not render your git history incomprehensible isn't that difficult, but you have to be deliberate about it. Check out my friend Rudy's quick explanation of how to do this.

full-disclosure I learned this from Brian Riley

Say Thanks
Respond
Filed Under