Pretty Git branch graphs
git, git-log
Solution
Update: I've posted an improved version of this answer to the Visualizing branch topology in Git question, since it's far more appropriate there. Leaving this answer for historical (& rep, I'll admit) reasons, though I'm really tempted to just delete it.
My two cents: I have two aliases I normally throw in my `~/.gitconfig` file:
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg = lg1
`git lg`/`git lg1` looks like this:
and `git lg2` looks like this:
(Note: There now exists much more applicable answers to this question, such as fracz's, Jubobs', or Harry Lee's!)
Problem
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?
Related problems
- Make a Bash alias that takes a parameter?
- Git pretty format colors
- Visualizing branch topology in Git
- Why does Git tell me "Not currently on any branch" after I run "git checkout origin/<branch>"?
- How does git commit --amend work, exactly?
- What is the difference between merging master into branch and merging branch into master?
- Color in git-log
- How to emulate git log --decorate's different colors per branch-type