美文网首页
git pull 提示错误,Your local changes

git pull 提示错误,Your local changes

作者: WenLia | 来源:发表于2017-10-08 11:31 被阅读8248次
error: Your local changes to the following files would be overwritten by merge:
       
Please commit your changes or stash them before you merge.

解决办法:
1、服务器代码合并本地代码

$ git stash     //暂存当前正在进行的工作。
$ git pull   origin master //拉取服务器的代码
$ git stash pop //合并暂存的代码

2、服务器代码覆盖本地代码

$git reset --hard  //回滚到上一个版本
$git pull origin master 

相关文章

网友评论

      本文标题:git pull 提示错误,Your local changes

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