@ g Ivan Prisyazhnyy on software engineering

Pretty git branch graphs

Source

I’ve seen some books and articles have some really pretty looking graphs of git branches and commits. Is there any tool that can make high-quality printable images of git history?

: I have two aliases I normally throw in my ~/.gitconfig file:

    [alias]
    lg1 = log --graph --abbrev-commit --decorate --date=relative --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(bold yellow)%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(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
    lg = !"git lg1"

git lg/git lg1 looks like this:

wow

and git lg2 looks like this:

wow

for textual output you can try:

git log --graph --oneline --all

blog comments powered by Disqus