Can't seem to discard changes in Git

后端 未结 20 1388
傲寒
傲寒 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:04

    I had this issue and after trying all of the above, nothing worked.

    What worked for me was to delete the directory that the file was in, then did git status and made sure that all the files in that dir are now marked as deleted. After that I simply did git checkout -f and everything was back to normal.

提交回复
热议问题