您的位置:首页 > 其它

git pull更新错误解决办法

2016-04-13 17:59 399 查看
git pull更新错误解决办法
2016.3.26  16:06

Your local changes to the following files would beoverwritten by merge

error: Your local changes to the following files would be overwritten by merge:protected/config/main.php

Please, commit your changes or stash them before you can merge.

参考http://blog.csdn.net/zwhfyy/article/details/8625228

如果希望保留生产服务器上所做的改动,仅仅并入新配置项, 处理方法如下:

git stash

git pull

git stash pop

然后可以使用git diff -w +文件名 来确认代码自动合并的情况.

反过来,如果希望用代码库中的文件完全覆盖本地工作版本. 方法如下:

git reset --hard

git pull
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: