I need to change the case of folders and files. First thing I tried was renaming the folders, but Git didn't pick up the changes. So I tried using git mv -f controller Controller
but it says :
fatal: renaming 'application/classes/controller failed: Permission denied
I have tried setting the global ignorecase flag:
git config --global core.ignorecase false
But it still doesn't work. Some people have suggested to move the folder out of repo, delete, then re-add but would this change get picked up when other people pull the repo? Is there anything else I could try?
Edit: It works for files but not folders.
To change the directory using a bash script is just like you would using normal bash. cd "C:/test/build" echo "You're now in the folder, do what you will." Save the file as . sh and it can be used as such.
To change this current working directory, you can use the "cd" command (where "cd" stands for "change directory"). For example, to move one directory upwards (into the current folder's parent folder), you can just call: $ cd ..
In order to navigate to a different drive/directory you can do it in convenient way (instead of typing cd /e/Study/Codes), just type in cd[Space], and drag-and-drop your directory Codes with your mouse to git bash, hit [Enter].
In summary of the comments, you'll have to rename the directory via a intermediate temporary name. E.g.
git mv controller Controller-tmp git mv Controller-tmp Controller
I think this has to do with the fact that the MinGW implementation of rename(2)
does not support this operation. See this thread, the MSDN docs on the CRT rename
implementation and those of the MoveFileEx
function.
Make sure to close Visual Studio and any Windows Explorer folders related to that path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With