Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,301,131
Community Members
 
Community Events
165
Community Groups

How do I change what commit is considered 'master' on a branch?

Edited

Pretty new to source tree, this is probably a really simple issue, but a recent commit/push broke our scene. I tried reversing the commit, but that gave an error, so I ended up 'checking out' a prior working node and working from there. I'm having trouble getting the 'origin/master' 'origin/head' 'master' tags to move to the most recent node. (see red outline in image)

The scene was working on every node before that merge (the current 'master' node).

The scene is also now once again working on my current 'HEAD', but I'm not sure how to set that as the 'master' so to speak

Any thoughts on how to resolve this?

Master.png

 

 

 

3 answers

I can't remember exactly how I resolved this particular issue, but I definitely recall creating a new branch and I feel like the issue wasn't present there, so I feel like I may have ended up making the new branch my primary branch and deleting the old one. Either that, or the rest of Mike's suggestion may have worked for me... I don't recall for sure.

Did this solution work for you? I did exactly as Mike instructed and every time I load my project its the same master branch it was before. Not the 'Temp' I was trying to revert back to. I've created 3 new branches now that I cant get rid of and I'm still having the same problem

0 votes
Mike Corsaro Atlassian Team Dec 05, 2018

Hello! The thing you're seeing is known as being on a detached HEAD. To fix this:

  • Create a new branch (hit the branch button)
  • Call it something like "Temp", make sure "Checkout new branch" is checked
  • When that's done, switch back to the master branch (just double click master in the sidebar)
  • Then, right click on "temp" in the sidebar, and click "merge 'Temp' into current branch". This will merge the changes you made on that detached HEAD back into the master branch
  • Your master branch will now have those changes you made (don't forget to push!), and everything should be working again

Suggest an answer

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

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

62,894 views 128 27
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