Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 运行时我收到一个错误";git push heroku master“;_Javascript_Heroku - Fatal编程技术网

Javascript 运行时我收到一个错误";git push heroku master“;

Javascript 运行时我收到一个错误";git push heroku master“;,javascript,heroku,Javascript,Heroku,在遵循heroku关于如何部署应用程序的官方说明后,我运行了“git push heroku master”,但出现以下错误: To https://git.heroku.com/miguelangelparedes.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://git.heroku.com/miguelangelparedes

在遵循heroku关于如何部署应用程序的官方说明后,我运行了“git push heroku master”,但出现以下错误:

To https://git.heroku.com/miguelangelparedes.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://git.heroku.com/miguelangelparedes.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
奇怪的是,在我运行“git pull”之后,它说一切都是最新的,当我再次按下时,我会得到同样的错误。如果有人帮忙就好了
  • 首先运行git pull,然后再次尝试推送
  • 如果您是唯一使用此存储库的人,并且您完全确定您的版本是正确的,那么您也可以
    git push-f
    ,但这将覆盖服务器的版本,因此您必须非常小心

  • Heroku应用程序仅从应用程序存储库的主分支运行(Heroku本地)。如果要将分支部署到Heroku,而Heroku不是本地回购的主分支,则需要指定它 尝试git推送我的分支名称:master!
    您可能需要添加-f标志来强制推送。

    @azidikk,如果我的答案对您有帮助,请接受并向上投票:)