Git   发布时间:2019-10-25  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了git pull遇到错误:error: Your local changes to the following files would be overwritten by merge:大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="dp-highlighter bg_plain">
<div class="bar">
<div class="tools">
[plain] <a class="Viewsource" title="view plain" href="http://blog.csdn.net/misakaqunianxiatian/article/details/51103734#" target="_blank">view plain<span data-mod="popu_168"><span data-mod="popu_168"> <a class="CopyToClipboard" title="copy" href="http://blog.csdn.net/misakaqunianxiatian/article/details/51103734#" target="_blank">copy

 
  1. git pull origin master  

如此一来,服务器上的代码更新到了本地,而且你本地修改的代码也没有被覆盖,之后使用add,commit,push 命令即可更新本地代码到服务器了。

方法2、如果你想完全地覆盖本地的代码,只保留服务器端代码,则直接回退到上一个版本,再进行pull:

<div class="dp-highlighter bg_plain">
<div class="bar">
<div class="tools">
[plain] <a class="Viewsource" title="view plain" href="http://blog.csdn.net/misakaqunianxiatian/article/details/51103734#" target="_blank">view plain<span data-mod="popu_168"><span data-mod="popu_168"> <a class="CopyToClipboard" title="copy" href="http://blog.csdn.net/misakaqunianxiatian/article/details/51103734#" target="_blank">copy

 
     reset --hard  
  1. git pull origin master  

注:其中origin master表示git的主分支。

大佬总结

以上是大佬教程为你收集整理的git pull遇到错误:error: Your local changes to the following files would be overwritten by merge:全部内容,希望文章能够帮你解决git pull遇到错误:error: Your local changes to the following files would be overwritten by merge:所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:
猜你在找的Git相关文章
其他相关热搜词更多
phpJavaPython程序员load如何string使用参数jquery开发安装listlinuxiosandroid工具javascriptcap