我在 Heroku 上有一个项目,我对该项目进行了一些更改,当我写入“git push heroku master”时出现错误。
To https://git.heroku.com/webookapp.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://git.heroku.com/webookapp.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我按顺序运行了以下命令。
heroku git:remote -a webookapp
git add .
git commit -m "update"
git push heroku master
git 告诉你你推送到的远程引用已经改变,你应该先更新它 - 有人在你之前推送了他们的工作,git 需要你检索该工作来评估你的工作是否可以干净地应用在上面。该提示是在暗示:
这通常是由另一个存储库推送到同一个引用引起的。在再次推送之前,您可能希望首先集成远程更改(例如,'git pull ...')。
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
尝试git pull
(您可能需要解决冲突),然后git push
再试一次。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句