I am trying to rename files from foobar.php to FooBar.php which is quite a challenge in Git. So far I have found out that I had to set up the git config value of ignorecas
As I was struggling with this issue on a directory level (rather than on a file level), here is the recipe applied to a folder (this was on Windows, git v2.9.2).
git mv Foobar Foobar.tmp
- You will get a set of renamed files, but also a set of deleted files and their corresponding untracked ones from the other path.git add .
- Stage all the deleted/untracked files.
git commit -m"syncing Foo[Bb]ar into temp. folder"
- Commit the temp. folder.git mv Foobar.tmp FooBar
- Now rename from temp. to the desired name.git commit -m"moving FooBar into place"
- Commit the target name.git push
- Now Bitbucket should show a single subdirectory FooBar.git config [--global] core.ignorecase false
- Never stumble into that problem again.