【发布时间】:2019-04-07 12:53:42
【问题描述】:
我想像往常一样在 github 中推送我的项目。但我得到了这个错误。 这意味着什么,我应该怎么做?
! [rejected] master -> master(先获取) 错误:未能将一些参考推送到“https://github.com/mojt/profile4.git” 提示:更新被拒绝,因为遥控器包含您所做的工作 提示:本地没有。这通常是由另一个存储库推送引起的 提示:相同的参考。您可能希望首先集成远程更改 提示:(例如,'git pull ...')在再次推动之前。 提示:有关详细信息,请参阅“git push --help”中的“关于快进的说明”。
非常感谢您。
【问题讨论】:
-
Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes (e.g., 'git pull ...') before pushing again. See the 'Note about fast-forwards' in 'git push --help' for details. -
它在错误中告诉你该怎么做。您在遥控器上进行了本地没有的更改。正如消息中所说,执行“git pull”应该可以修复它。
-
非常感谢。这很有帮助