Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Master branch split into two branches in Sourcetree

We had 2 developers pushing to the master branch during a publish session recently. The original master branch looked like this:


Dev #1 pushed a commit with labels to origin(C1), then Dev #2 pushed 2 commits with labels to origin(C2 and C3), using rebase. This worked, but it created 2 additional "orphan" commits on a side branch - the labels were still attached to the orphans, as follows:

--Cx--C0--C1+labels--C2--C3        (master)
             \--C2+labels--C3+labels     (orphan)


To remedy this dev #2 deleted the labels (from local and origin) and reapplied them to the commits in the master branch. No big deal, now we have this:

--C0--C1+labels--C2+labels--C3+labels   (master)

Meanwhile, Dev #1 pushed another commit to origin, C4 (no labels). Dev #2 pulled this commit and the "source tree" was split asunder -- we now have what appears to be 2 separate branches, like this:

--C3+labels--C4                   (master)
--Cx--C0--C1+labels--C2+labels    (orphan)

Note there are apparently NO preceding commits to what is now labeled "master" in the tree view. All previous commits are now in the "orphan" branch.

After a moment of panic, we realized the repo was fine, just the display was broken. Git log shows everything where it should be, as does GitKraken (Dev #3) -- and so does Sourcetree, but only if we switch it from "All Branches" mode to "Current Branch" mode. When we switch back to All Branches mode it appears to be broken again.

I have no idea if the steps we followed contributed to the confusion, so I included them just in case. This is obviously a Sourcetree bug, not a git issue. Can we get this fixed please?

Dave Newman

1 answer

1 accepted

0 votes
Answer accepted
Manju Atlassian Team Feb 07, 2018

Merging the orphan branch to master might resolve this discrepancy. Have you tried it?

That doesn't work - there is nothing to merge. The master branch is whole and intact, it's just the display that's incorrect.

Manju Atlassian Team Feb 07, 2018

Can you add a screenshot? Is this on the macOS or Windows?

This is on Windows 10. I'm not sure how to attach a srceenshot, but I'm game to try.

Here are the 2 screen shots. Dev #1 (not me) get anxious and merged in a random commit from the master branch, but you should be able to see what's going on.

Please let me know if there's anything else I can send you to assist.


Mike Corsaro Atlassian Team Feb 07, 2018

Hey Dave, I think this might be a known bug that you're seeing. Can you try viewing the log with "All Branches" showing, but change "Date Order" to "Ancestor Order" and see if that looks right?

Like nadorozhnyy likes this

Yep, you nailed it! Thanks for the prompt response. Any idea when you are going to get that fixed? We are running version, is there a newer version?

Mike Corsaro Atlassian Team Feb 07, 2018

Glad to hear. 2.4.8 is currently rolling out now but does not fix this specific issue. The next release (2.5.X) will address it, as well as include enterprise-specific features (it should be rolling out to the beta group within the next few weeks).


If you'd like to know more about this bug, you can track it here

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,289 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you