error: Your local changes to the following files would be overwritten by merge:
       ***********
Please, commit your changes or stash them before you can merge.

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

git stash
git pull
git stash pop

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

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

git reset --hard
git pull

Tip: 慎用reset. 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2021-12-20
  • 2021-05-15
  • 2022-12-23
  • 2021-06-24
猜你喜欢
  • 2022-01-01
  • 2022-03-01
  • 2021-10-22
  • 2021-12-22
  • 2021-07-24
相关资源
相似解决方案