我在windows上使用git,我的repo中有一个文件,让我们说"foo.txt".今天我想把这个文件重命名为"Foo.txt"(大写).正如在这个SO问题中所建议的那样,我使用了git mv -f foo.txt Foo.txt它,产生了预期的结果.我继续提交更改我的回购协议.
编辑:我希望这是一个永久性的更改,仍然能够签署提前更改.
但是,之后我尝试切换分支时遇到错误:
# I'm on branch1
git checkout branch2
Aborting
error: The following untracked working tree files would be overwritten by checkout:
Foo.txt
Please move or remove them before you can switch branches.
Run Code Online (Sandbox Code Playgroud)
经过一番探索,我发现我的.git/config文件有以下设置:
[core]
ignorecase=false
Run Code Online (Sandbox Code Playgroud)
将此更改为true似乎可以解决问题并允许我在正常情况下在分支之间进行更改.
关于这一点,我想知道:
谢谢!