Git Aliases

Adding an alias to your git config to display a graphical branch view is as easy as issuing the following command:

$ git config --global alias.cglog log --graph \
 --pretty=format:%Cgreen%h%x09%Cblue%aN%x09%Cred%ad%x09%Creset%s --date=short

You could also manually add the following to your .gitconfig in the [alias] section:

[alias]
  cglog = log --graph --pretty=format:%Cgreen%h%x09%Cblue%aN%x09%Cred%ad%x09%Creset%s --date=short

Displays as:

$ git cglog
* j4bjah4       John Doe  2013-06-04      Commit message
*   k5biajh     John Doe  2013-06-04      Commit message
|\
| * i459bz6     John Doe  2013-06-03      Commit message
|/
* na3nc3k       John Doe  2013-06-02      Commit message

The pretty format placeholders used here are:

Placeholder Description
%Ccolor Switch to color
%Creset Reset color
%h Abbreviated commit hash
%x09 Tab
%aN Author name
%ad Author date
%s Subject

Documentation for git alias, log and pretty format placeholders are available at https://git.wiki.kernel.org/index.php/Aliases and http://git-scm.com/docs/git-log.