I\'ve seen some books and articles have some really pretty looking graphs of git branches and commits. How can I make high-quality printable images of git history?
I have this git log alias in ~/.gitconfig to view the graph history:
[alias]
l = log --all --graph --pretty=format:'%C(auto)%h%C(auto)%d %s %C(dim white)(%aN, %ar)'
With this in place, git l will output something like:
In Git 2.12+ you can even customize the line colors of the graph using the log.graphColors configuration option.
As for the logs' format, it's similar to --oneline, with the addition of the author name (respecting .mailmap) and the relative author date. Note that the %C(auto) syntax, which tells Git to use the default colors for commit hash, etc. is supported in Git >= 1.8.3.