【问题标题】:Git Not Able to Pull As Changes Done On Server Files [duplicate]Git无法在服务器文件上完成更改时提取[重复]
【发布时间】:2017-02-28 18:51:25
【问题描述】:

我已经完成了从本地到服务器git push 的操作。不幸的是,在我对服务器文件进行了一些更改之后,在拉之前。

所以它不允许我拉。

root@magento-dev-1:/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

如何解决这个问题?

【问题讨论】:

  • 阅读消息 > 请在合并之前提交您的更改或存储它们。
  • 怎么做?
  • 运行 git stashgit commit

标签: git server git-pull pull


【解决方案1】:

您必须先提交更改或将它们存储起来。

git stash

这会将您修改的更改放在一边,并使您的工作目录干净。稍后,在拉取之后,您可以重新应用这些更改

git stash pop

这是 Git 建议你做的。

请在合并之前提交您的更改或存储它们。

【讨论】:

    猜你喜欢
    • 2014-08-11
    • 1970-01-01
    • 2014-07-11
    • 1970-01-01
    • 1970-01-01
    • 2017-08-29
    • 1970-01-01
    • 1970-01-01
    • 2018-11-12
    相关资源
    最近更新 更多