Git on windows: Can't switch branch after renaming a file (only changed case)

后端 未结 2 991
栀梦
栀梦 2021-01-11 14:23

I\'m working with git on windows, and I have a file in my repo, lets say \"foo.txt\". Today I wanted to rename this file to \"Foo.txt\" (uppercase). As suggested in this SO

2条回答
  •  借酒劲吻你
    2021-01-11 15:09

    A simple (but inelegant) way to overcome this problem without having to change the config setting is to delete the file and to check it out again. In my case this allowed my changes branches as normal again.

    Edit: As Avivr has pointed out, my proposed workaround doesn't solve the problem permanently. I will still not delete this answer because it may help as a temporary hot-fix in some cases.

提交回复
热议问题