Git asks me to commit or stash changes on checkout master, even though all changes were committed?

前端 未结 8 1780
误落风尘
误落风尘 2020-12-28 12:48

I have two branches locally, master and Berislav. The latter is currently active, and I have committed all the changes. When I try to checkout to <

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 13:07

    Very similar to @JohnHammink answer but here goes.

    Solution

    1. Remove file to another directory.
    2. Commit your changes (it might show you just removed two files).
    3. Add the file again to the directory.
    4. Commit (you should be able to see only one file being committed).

    In my case this was because of a file that was renamed with only a change to the case. e.g. fooViewModel to FooViewModel. Git kept thinking that the same file was actually two separate files.

    I think this has something to do with Unix being case sensitive while windows not really.

    Hope this helps

提交回复
热议问题