Sourcetree GUI : Why main branch is behind another branch? Is it normal?

43 views Asked by At

I have main branch and ChangeWS branch. ChangeWS branch is separate from main branch and updated sourcecode. Sourcecode in ChangeWS branch is updated more than main branch.

Grainy picture of branches

From picture: main branch is behind ChangeWS branch.

  • Is it normal?

  • Why main branch is not in main blue line? Why it is red line separate from main blue line.

  • Can I merge ChangeWS into main branch? because finally I will merge ChangeWS branch into main branch.

1

There are 1 answers

0
Ali On

It is totally normal. What you see is a graph representing the current state of branches. It might show it differently if your current branch is main or ChangeWS.

Also, depending on what UI tool you are using the graph could be slightly different. Some tools try to have the main branch in a straight line, but it is not always the case. Again, colours are picked at random to differentiate related parts of the graph.

You can always try to merge and there might be conflicts and you will deal with them if there is one.

A good practice is to pull the latest main branch into your current branch and deal with any conflicts on your branch and then try to merge into main by creating a pull request to the main branch.

This pull request is then passed on to a peer to review and approve the changes which then might result in a merge if you are using something like Bitbucket or Gitlab.