gpt4 book ai didi

git - 将应用程序推送到 heroku 时如何解决非快进更新错误?

转载 作者:太空狗 更新时间:2023-10-29 14:33:13 25 4
gpt4 key购买 nike

尝试在 heroku 中更新我的第一个 node.js 应用程序时,我有点卡住了。

应用程序的初始版本已成功部署,但现在当我尝试部署修改后的应用程序时,出现了一些问题。这是命令和输出

> git push heroku master
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:....git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note
about fast-forwards' section of 'git push --help' for details.

git status 命令显示如下:

On branch master
Your branch is ahead of 'origin/master' by 1 commit.

最佳答案

在 heroku 上这样做是有意义的:

git push -f heroku master

因为您不是将其用作修订系统,而是用作部署器。

关于git - 将应用程序推送到 heroku 时如何解决非快进更新错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17613394/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com