We had 2 developers pushing to the master branch during a publish session recently. The original master branch looked like this:
--Cx--C0
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)
Ugh.
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?
Thanks,
Dave Newman
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you add a screenshot? Is this on the macOS or Windows?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is on Windows 10. I'm not sure how to attach a srceenshot, but I'm game to try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, you nailed it! Thanks for the prompt response. Any idea when you are going to get that fixed? We are running version 2.4.7.0, is there a newer version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.