轉發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:
	app/Http/Controllers/Admin/SystemController.php
	app/Http/Middleware/NoLogin.php
	routes/web.php
Please, commit your changes or stash them before you can merge.
Aborting

解決辦法:

1、服務器代碼合併本地代碼

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

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

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章