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

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

Justin Turner I'm New Here Nov 22, 2018

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

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
0 votes
Ethan Thompson I'm New Here Apr 28, 2019

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
Justin Turner I'm New Here May 06, 2019

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.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,851 views 13 18
Join discussion

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