Hi,
we are using Git Flow, pushing the branches to Stash. The format has been since the beginning Feature/[Branch Name].
We now can see that few branches are duplicate in the format of: feature/[Branch Name].
The connection between local Source Trees and those branches is broken, until a fresh clone is done.
Also Bamboo is now failing to retrieve commits from any branch starting with feature/.
Bamboo and Stash are hosted on Windows 64Bit.
Any idea how this mismatch of lower to capital letter is occurred? How can we fix it?
Thanks
I had a support case about this a year ago. The short answer is that Stash and Git are case-sensitive, but on Windows, the file system is not and this causes the problem. You should remove the feature/* (or Feature/*) branches from the server and tell everybody to stick to one or the other. (feature/ is a better option, because branches created on the Stash web UI will have this and I think you cannot change that.)
Here is the end of my discussion with support:
Currently, I am instructing the users to either:
I think I understand now what is going on. Both locally and on the server, there is a refs/heads/[Ff]eature folder, created when the first feature branch is created there.
So e.g.:
1.: On the server, there is already at least one feature branch, starting with "f", so the folder also starts with "f".
2.: The local clone is fresh and no feature branches have yet been checked out, so the refs/heads/[Ff]eature folder does not exist yet.
3.: Developer creates "Feature/whatever" (so the local folder is "Feature"), commits to it and pushes this to the server.
4.: The server creates "feature/whatever" and stores the commit there. (For some reason, this is the only time when the conversion of the lower/upper case is successful and the server really does not care about case.)
5.: Developer commits again to the local "Feature/whatever", tries to push it, gets "failed to lock refs/heads/Feature/whatever", because the server has "refs/heads/feature/whatever" (still cannot understand why the case conversion does not work at this point).
(This works the other way around as well, if the first feature branch is created starting with "F", all the branches will be like that. Also when displayed on the web interface of the server.)
I have this problem too since someone create a branch beginning Bugfix/... it's driving me crazy, will try @Balazs Szakmary solution.
I've since put in a branch naming standard hook from our own plugin (sorry, cheap plug), but unfortunately too late.
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.