I saw a lot of very nice git graphs like in this post: Pretty git branch graphs
But there was never the branch name, in which the commit was done. How can I add this?
I saw a lot of very nice git graphs like in this post: Pretty git branch graphs
But there was never the branch name, in which the commit was done. How can I add this?
The --decorate
flag adds branch names to git log
. For example, without:
$ git log --oneline --graph
* 51ebf55b93 The sixth batch for 2.26
* f97741f6e9 Merge branch 'es/outside-repo-errmsg-hints'
|\
| * e0020b2f82 prefix_path: show gitdir when arg is outside repo
* | 123538444f Merge branch 'jk/doc-credential-helper'
|\ \
| * | cc4f2eb828 doc: move credential helper info into gitcredentials(7)
With --decorate
:
$ git log --oneline --graph --decorate
* 51ebf55b93 (HEAD -> master, origin/master, origin/HEAD) The sixth batch for 2.26
* f97741f6e9 Merge branch 'es/outside-repo-errmsg-hints'
|\
| * e0020b2f82 (es/outside-repo-errmsg-hints) prefix_path: show gitdir when arg is outside repo
* | 123538444f Merge branch 'jk/doc-credential-helper'
|\ \
| * | cc4f2eb828 (jk/doc-credential-helper) doc: move credential helper info into gitcredentials(7)