使用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