Can't seem to discard changes in Git

后端 未结 20 1381
傲寒
傲寒 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 21:55

    There is a easy solution. If this happens (normally from unexpected windows shutdown or memory dump) and you cannot discard your changes and even switch between branches (Git says you don't have enough permission); in Windows environment show all hidden files and folders from folder options. Go to your GIT directory (should be start with .git) and delete the "index.lock" file. Then Git should let you do whatever you want to do.

提交回复
热议问题