【发布时间】:2021-01-23 16:01:58
【问题描述】:
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 的一些更改,可能只是参考文章中的信息的临时更改?)
【问题讨论】: