Alpha Hydrae

Coding on the edge of the web...

Git: How to Log Commits From All Branches

By default, the git log command will only show commits reachable from HEAD.

1
2
3
A---B---C---D (master)
     \
      \-E---F (HEAD, develop)
git log –oneline –graph –decorate
1
2
3
4
* f536261 (HEAD, develop) F
* 1c49789 E
* 0f00043 B
* 5f8165a A

To also show commits from other branches, you have to add the --all option.

git log –oneline –graph –decorate –all
1
2
3
4
5
6
7
* f536261 (HEAD, develop) F
* 1c49789 E
| * e384c0c (master) D
| * 826c7a6 C
|/  
* 0f00043 B
* 5f8165a A

Comments