码迷,mamicode.com
首页 > 其他好文 > 详细

使用git pull同步github代码到服务器

时间:2019-02-17 20:37:03      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:before   over   版本   工作   github   The   pre   遇到   protected   

我直接用git pull的时候遇到这个错误:

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.

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

git reset --hard
git pull

然后就可以了

使用git pull同步github代码到服务器

标签:before   over   版本   工作   github   The   pre   遇到   protected   

原文地址:https://www.cnblogs.com/yzloo/p/10392288.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!