>我有这个:
$ git checkout -- .
$ git pull
Updating 4411c31..db4498d
error: Your local changes to the following files would be overwritten by merge:
index.js
utils.js
Please commit your changes or stash them before you merge.
Aborting
我一直在尝试git checkout -- .
它不断给我同样的信息。如何消除此处的本地更改?我不希望保留对索引.js和实用程序.js的更改。
我最好的猜测是你的文件已经在 git 中暂存。这意味着要摆脱更改,您必须git reset HEAD .
取消暂存更改,然后git checkout -- .
实际删除它们。如果这是不正确的,你能展示git status
的结果吗?