Your local changes to the following files would be overwritten by merge异常

开发模块化暂时用SourceTree来管理代码(类似与SVNCornerstone)。
在拉取服务器代码时出现了冲突,记录以供后续参考:
error: Your local changes to the following files would be overwritten by merge: xxx/xxx/xxx Please, commit your changes or stash them before you can merge. Aborting。

Git出现冲突报错
error: Your local changes to the following files would be overwritten by merge: xxx/…
含义:xxx/…这些提及的文件在远程端与本地端相应的文件单元的内容发生冲突

解决方案:
1)远程端状态还原至相对于本地端未发生更改的上某个历史点,再pull(不推荐)
2)本地端先手动备份->直接把发生冲突的文件单元在本地端相应的冲突文件丢弃(本地写的代码直接没了),->直接拉取服务器内容(强烈推荐)

发布了121 篇原创文章 · 获赞 4 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/yanhaijunyan/article/details/105239756