我试过第一个答案: git stash 得分最高,但错误消息仍然出现,然后我发现本文提交了更改,而不是stash 'Reluctant Commit'
git stash
最后错误信息消失了:
1: git add .
git add .
2: git commit -m "this is an additional commit"
git commit -m "this is an additional commit"
三: git checkout the-other-file-name
git checkout the-other-file-name
然后成功了。希望这个答案有帮助。:)