美文网首页
Git工作区不干净暴力解决方法

Git工作区不干净暴力解决方法

作者: Mr__Professor | 来源:发表于2016-07-20 01:06 被阅读195次

错误提示:

error: Your local changes to the following files would be overwritten by merge:

application/config/config.php

application/controllers/home.php

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

Aborting

暴力解决方法:

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

git stash

git pull

git stash pop

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

git reset --hard

git pull

暴力解决,没毛病!!!

相关文章

网友评论

      本文标题:Git工作区不干净暴力解决方法

      本文链接:https://www.haomeiwen.com/subject/xmkvjttx.html