Git remote two branches of the same name different cases

origin/joetest
origin/JoeTest

      

I have a problem. I have two remote branches in git that have the same name in different cases.

I can't figure out what to do in visual studio online. I can see the differences, but I cannot bring them together due to conflicts.

The git tools in visual studio and git bash can't tell the difference between these two cases and the people who are working on them, now syncing happens with some commits on one and some on the other.

Any thoughts on what we can do?

thank

+3


source to share


2 answers


Clone storage in an operating system with a case sensitive file system, for example. Linux, then rename one of the branches, push it and delete the old branch:

git clone <url> repo
cd repo
git checkout -b joetest2 origin/JoeTest
git push origin joetest2:joetest2
git push origin :JoeTest

      



As to why Git has branch naming issues with different case, see this related question .

+5


source


There is some kind of magic that I just discovered and it works under windows. I had two directories

XUnitRemote and XunitRemote

I did the following



 git mv XunitRemote XUnitRemote.todo
 git mv XUnitRemote.todo XUnitRemote

      

and it just worked

0


source







All Articles