Can't seem to discard changes in Git

后端 未结 20 1256
傲寒
傲寒 2020-11-29 21:17

After seeing the following from the command line:

# On branch RB_3.0.10
# Changed but not updated:
#   (use \"git add ...\" to update what will b         


        
相关标签:
20条回答
  • 2020-11-29 22:05

    I had the same problem, nothing from the above comments worked. It turned out, that my filesystem is not case sensitive (osx default, but windows probably behaves the same) and a file was present with both uppercase and lowercase in the same directory, with different content. Since on my computer both names pointed at the same file, git status always showed a modification, no matter what I did. To resolve the problem:

    • I had to remove one of the files from another computer and push it to repo

    • delete the whole local version completely

    • do git clone from scratch

    0 讨论(0)
  • 2020-11-29 22:05

    I had a permissions problem in Windows and had to do icacls containingFolder /reset /t /l /c and then double-click the folder to get my permissions back.

    0 讨论(0)
提交回复
热议问题