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

SourceTree Errors with Gitflow

Occasionally when pulling we recieve the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin


* [new branch] feature/NET-22_Client_compliance_reporting -> origin/feature/NET-22_Client_compliance_reporting

error: Ref refs/remotes/origin/feature/NET-59 is at 1ce1dab2397ab550981a5304a8104c86e384f1b9 but expected 34ae75a0a9e6a452c8cc5939c34828ddfa7392ea

! 34ae75a..1ce1dab feature/NET-59 -> origin/feature/NET-59 (unable to update local ref)

Upon examination of the remote we see two feature branches for NET-59, one with uppercase Feature and another with lowercase feature.

We have no idea how or why this is occuring as the team is using the Git Flow exclusively, all from windows boxes. Recloning the repo seems to temporarily solve the issue, but we've had to do it enough times now that we are worried it could cause larger issues.

Our repo is on github but we are open to moving it to bitbucket if that will help.


2 answers

The problem here is that Windows is case-insensitive, while Git and Linux are case-sensitive.

From manojlds on StackOverflow: "Branches are just pointers to a commit. These pointers are just files." Since filenames are case-insensitive on Windows, both of the branches you have (feature/* and Feature/*) are trying to update the same pointer file, which is bad.

To fix, you should delete the incorrectly-cased branch from the remote, and review your developers' gitflow settings to make sure none of them accidentally set their feature prefix with a capital F.

If there are unique commits in the branch that needs deleted, tag it first, and you can merge or cherry-pick into the correct branch once things are fixed.

Instruct your users to either

  • always use only lowercase when creating branches locally or
  • create their branches on the web interface and then pull them to their clones,

to avoid this kind of problem in the future.

Sounds simple enough! Thanks ;)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Atlassian Community Events

Hello from city #68 on the road!

Hello from my sixty-eighth city in a long-term RV trip I started in 2015!  I've traveled all over the US staying in different cities and states for just a few days up to many months. This week I...

43 views 1 7
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