亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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 關注
  • 111 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號