2016-10-19 131 views
0

我已經完成了從本地服務器到服務器的git push。不幸的是,在我對服務器文件進行了一些更改之後拉動了。Git無法在服務器文件上進行更改

所以它不允許我拉。

[email protected]:/var/www/html/magento# git pull 
Updating 4d1729d..6e1c543 
error: Your local changes to the following files would be overwritten by merge: 
     magento/app/code/Custome/Module/Ui/Component/Listing/Column/Actions.php 
     magento/app/code/Custome/Module/view/adminhtml/ui_component/posts_index.xml 
     magento/app/code/Custome/Module/view/frontend/templates/etrade/form.phtml 
Please, commit your changes or stash them before you can merge. 
Aborting 

如何解決這個問題?

+1

閱讀消息>請在提交您的更改或隱藏它們,然後才能合併。 – ymonad

+0

如何做到這一點? –

+0

運行'git stash'或'git commit' – ymonad

回答

2

您必須首先提交您的更改或隱藏它們。

git stash 

這會將修改後的更改放在一邊,使您的工作目錄變得乾淨。稍後,在拉動之後,您可以重新應用這些更改

git stash pop 

這是Git建議您執行的操作。

請在提交您的更改或隱藏它們後再進行合併。

相關問題