Occasionally when pulling we recieve the following error:
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
From https://github.com/pdhiscc/conxus-web
* [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.
Ideas?
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
to avoid this kind of problem in the future.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.