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


我直接用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

然后就可以了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM