问题
今天在拉去项目最新代码时(git pull),出现如下报错:
error: Your local changes to the following files would be overwritten by merge:
xx/xx.json
Please commit your changes or stash them before you merge.
Aborting
Updating xxxxxx1..xxxxxx2
错误:您对以下文件的本地更改将被合并覆盖:
xx/xx.json
请在合并之前提交更改或将其隐藏。
中止
正在更新xxxxxx1..xxxxxx2
尝试
将当前代码手动更改回滚到“xxxxxx1”版本后,git pull仍然报如上错误。
阅读exp
Git冲突:commit your changes or stash them before you can merge._commit your changes before-CSDN博客
解决
采取exp中的第二条方式“放弃本地修改,直接覆盖”
git reset --hard
git pull
解决问题。
607

被折叠的 条评论
为什么被折叠?



