为了账号安全,请及时绑定邮箱和手机立即绑定

Heroku:从非主分支的源分支推送更新

Heroku:从非主分支的源分支推送更新

慕斯709654 2023-10-31 21:19:14
我正在尝试将我的应用程序上传到heroku,但heroku/python构建包没有构建我的应用程序并说它与它不兼容,我有一个Procfile和一个requirements.txt文件。所有必需的文件都已添加并提交,该应用程序在我的本地计算机上完美运行。这是需求文件:这是Proc文件:这是输出:$ git push heroku masterEnumerating objects: 197, done.Counting objects: 100% (197/197), done.Delta compression using up to 4 threadsCompressing objects: 100% (189/189), done.Writing objects: 100% (197/197), 51.94 KiB | 2.16 MiB/s, done.Total 197 (delta 93), reused 0 (delta 0)remote: Compressing source files... done.remote: Building source:remote:remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgzremote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failureremote:remote:  !     Push failedremote: !remote:  ! ## Warning - The same version of this code has already been built: 644afa937ebb796a0ba0e2c8f3a459f4accbac36remote:  !remote:  ! We have detected that you have triggered a build from source code with version 644afa937ebb796a0ba0e2c8f3a459f4accbac36remote:  ! 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>:mainremote:  !remote:  ! This article goes into details on the behavior:remote:  !   https://devcenter.heroku.com/articles/duplicate-build-versionremote:remote: Verifying deploy...remote:remote: !       Push rejected to botsenior.remote:该文件夹本身看起来像这样:我已尽我所能来解决这个问题。我多次删除了heroku应用程序并再次创建了它,我尝试更改requirements.txt文件中的模块版本,但似乎没有任何效果。非常感谢您的帮助。注意:我从一个源分支推送,该分支不是本地 git 存储库上的 master 分支,但我将其推送到 heroku 远程存储库上的 master 分支。我不知道这是否是一个问题,但我认为指定这一点很重要
查看完整描述

1 回答

?
繁星淼淼

TA贡献1775条经验 获得超11个赞

为了从不是主分支的本地分支推送,您必须指定源分支和目标分支并用冒号分隔它们:

git push heroku <source>:<target>


查看完整回答
反对 回复 2023-10-31
  • 1 回答
  • 0 关注
  • 55 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信