0

I am using Gitlab for storing my repositories on remote. I recently changed the case of 1 folder name inside my local repository using the following command

 git mv FolderName foldername

The problem that I am facing is that the name of folder is not getting changed on origin after pushing. What might the cause and solution for this.

vipin agrahari
  • 2,691
  • 3
  • 21
  • 31

1 Answers1

0

I'm sure there's a smarter solution, but the simple way I've done this in the past with files (but I imagine it would work with a directory too) is to rename the file to something that differs by more than just the case, then rename it back with the correct casing, for example:

git mv FolderName FolderName2
git commit ...
git push ...
giv mv FolderName2 foldername
git commit ...
git push ...

Obviously it depends how careful you want to be with your git history - this creates some not-very-pretty commits that you'd probably prefer not to have, but if you don't mind that, it's a quick and easy solution.

DaveyDaveDave
  • 9,821
  • 11
  • 64
  • 77