Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Commit Log graph - confused

Tags:

git

I am a relatively newbie to GIT and having issues understanding Commit Log graph.

I am under the feeling that each parallel line is a branch.While my source has only 2 branches..I see 3-4 parallel lines in the commit log graph provided below(Microsoft Team Services).Can someone help me understanding this?

enter image description here

like image 717
raj'sCubicle Avatar asked Sep 14 '26 22:09

raj'sCubicle


1 Answers

Correct. Each parallel line is a branch.

In the example image that you gave above those 7-character strings are (short versions of) commit IDs.

For ease of explaining I am going to include this graph (below) that I found online; particularly because it shows the order of the commits, the first commit, and the last commit.

enter image description here

Listing of the branches

In this graph there are four branches. They are:

  1. master branch (represented by the purple dots)

  2. next branch (represented by the green dots)

  3. feature-1 branch (represented by the pink dots)

  4. and feature-2 branch (represented by the orange dots)

The line between commit ID 1b43a59 and commit ID 2b59872, and including commit ID 5f357ab and commit ID 3c5bf63, is the master branch.

The line between commit ID 1b43a59 and commit ID 1ce9df1, and including commit ID dff00dd, is the next branch.

The line between commit ID 1b43a59 and commit ID 5f357ab, and including commit ID 9ffab9f and commit ID 9db9694, is the feature-1 branch.

The line between commit ID 1b43a59 and commit ID 3c5bf63, and including commit ID 54a16ed and commit ID 813c45b, is the feature-2 branch.

Listing of the merges

The feature-1 branch is merged into the next branch at the commit represented by commit ID dff00dd.

The feature-1 branch is merged into the master branch at the commit represented by commit ID 5f357ab.

The feature-2 branchis merged into the master branch at the commit represented by commit ID 3c5bf63.

The feature-2 branchis merged into the next branch at the commit represented by commit ID 1ce9df1.

The next branch is not merged into anything.

like image 183
Jamie Bort Avatar answered Sep 18 '26 19:09

Jamie Bort



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!