Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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
Community Members
Community Events
Community Groups

HEAD branch is behind master in SourceTree

Somewhat new to source control and Sourcetree.I checked out a previous commit and it created a HEAD branch (that is not acting like a branch at all).

I want to go back to only having one branch (master). Please help!

2 answers

1 accepted

3 votes
Answer accepted

so what I found is that I needed to create a branch from my "HEAD" branch (which isn't really a branch at all) using the new branch command. At that point head is gone! yay! Then I was able to merge that branch with master and delete the unwanted branch I had created from HEAD.

You could also have checked out an existing branch, then used right-click on the latest commit and selected Reset <branch> to this commit to move the branch pointer to where you want it to be.

When HEAD is displayed, it means that you're on a detached HEAD, which means you have no branch checked out and any commits won't move any branches when they're made. If you checkout a detached HEAD in SourceTree, it will warn you fairly obviously, so maybe this was done on the command line beforehand and you saw the after effects in SourceTree.

Like Tarsha de Souza likes this

@edwon 's advice worked for me

@steve did not; when I cheked out an existing branch, I lost of my my changes on a detached HEAD (luckily did a backup beforewards).

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events