Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding Git Branches graph view

Can anyone kindly explain me what is going on here >

enter image description here

git log shows me that 'edit cm.api.post' is the HEAD of Broadcast-feature branch. However the graph shows there are other commits on the same branch as well.

Note: This graph is of our 'master' branch (left-most line is master). When I view graph of 'Broadcast-feature' only then it shows fine with no extra commits

like image 870
neebz Avatar asked Apr 05 '14 07:04

neebz


People also ask

How do I read a git graph?

Git stores history as a graph of snapshots of the entire repository. These snapshots, called commits in Git, can have multiple parents, creating a history that looks like a graph instead of a straight line.

What do the colors mean on git log graph?

The colors are merely meant to help you view the lines as distinct from other lines. To answer question #1, they are assigned not pseudo-randomly, but rather sequentially, each time git log --graph picks a new "column number".


2 Answers

For those coming from Google looking how to fix the commit order for the git-flow: choose "Date Order" instead of "Ancestor Order":

Screenshot

like image 120
Max Malysh Avatar answered Oct 01 '22 21:10

Max Malysh


Just scroll up your graph a little bit further to see in what branch those commits end up.

Someone created another branch starting at "broadcast-feature". The commits shown are the commits contained in that branch.

Remember: In git a "branch" is not much more than a label for some commit.

like image 25
michas Avatar answered Oct 01 '22 21:10

michas