Git graph: develop branch shown as linear instead of as a diverged branch of master (that I think)

0

Issue

I have two branches: master & develop. Develop diverges from master after the second commit on master and has own 3 commits. However the graph in gitk as well as in command line is shown as linear as below:

In Gitk

enter image description here

I believe it should resemble more like a branch something like the below:

enter image description here

I am still learning the basics and not even sure whether my interpretation of what a branched graph should look like is even the right way or not.

thanks
app

Solution

They have not “diverged” in the sense that there has been no parallel work on master. master still contains a subset of the changes on develop. There is no value at all in rendering a curved line in this case.

The graph you’re expecting to see will only occur if both branches contain commits after the point at which they diverge. If you add a commit on master, Git (and gitk) will render the graph with a fork in.

Answered By – meagar

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More