Heroku认为我在一个"不同的分支"上,但我并没有(而且代码的相同版本显然并没有像宣称的那样"被构建"):
remote: ! ## Warning - The same version of this code has already been built: e437cb472232ed140fa6dd710e8b4a6b16b8b213
remote: !
remote: ! We have detected that you have triggered a build from source code with version e437cb472232ec180fa6dd700e8b4a6b1ab8b213
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
该文章提到:
这篇文章仍在制作中,或记录了尚未向所有用户发布的功能。 这篇文章未列出。 只有具有链接的人才能访问它。
无论如何,我运行了
git push heroku master:main
如您所请求的,它发出了警告,但我还是部署了(这在以前用git push heroku master
时是不会发生的)。
应用程序已部署,这意味着问题已解决。但我不确定导致应用程序无法在没有上述特殊命令的情况下部署的原因是什么。
我不确定这是否是Heroku的一些奇怪问题,或者是GitHub的新变化?(我知道他们计划将单词“master”更改为“main”——我想知道这是否是原因?或者这只是对Heroku进行的一些更改,可能是基于引用文章中的消息而做的暂时性更改?)