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.
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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
A note to all watchers that we've moved to a new community home... https://community.atlassian.com/t5/Agility/ct-p/agility Please update your notification subscriptions to keep across the ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs