更新代码后显示:
your local changes to the following files would be overwritten by merge…
please move or remove them before you merge

更新代码后显示错误如下
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- raymond27 2023-08-01 16:01关注
问题原因:
新修改的代码之前未提交,可能被服务器上的代码覆盖
解决方法1:
保留本地修改,然后add/commit/push到远程仓库git stash // 暂存本地修改
git pull origin master // 拉取服务器最新代码
git stash pop // 暂存代码恢复本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报