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

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

Local Branches Missing - Detached Head

Hey all,

I'm experiencing some very strange behavior with git using Sourcetree and cannot seem to determine the cause of the issue. The problem began after making a commit and pushing it to a branch that was being tracked in the remote repository.

Now when I open Sourcetree I can no longer see any of my local branches. My IDE lists that I'm working with a detached head.Sourcetree 1.PNG

If I check my remote branches I can see every branch other than the one which I last committed to. However any attempt to pull or fetch from the repo gives me the warning "reference broken" and is unable to update the local ref.Remote Branches.PNG

When I look at the repository online all of the branches are there, including my last commit. This repository can be cloned into a new local repository that operates as expected.

leuart_development.PNG

Can anyone help me understand what is happening? Any suggestions for moving past this issue would be much appreciated.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
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...

5,844 views 4 13
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