git pull 提示錯誤,Your local changes to the following files would be overwritten by merge


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

解決辦法:
1、服務器代碼合並本地代碼

$ git stash     //暫存當前正在進行的工作。
$ git pull   origin master //拉取服務器的代碼
$ git stash pop //合並暫存的代碼

2、服務器代碼覆蓋本地代碼

$git reset --hard  //回滾到上一個版本
$git pull origin master 





免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM