Почему я не могу нажать на героку? [дубликат]

Dec 08 2020
C:\Users\User\Desktop\AlveusBot>git push heroku master:main
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 16 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 1.12 KiB | 1.12 MiB/s, done.
Total 8 (delta 1), reused 0 (delta 0), pack-reused 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.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: 36a9c86df5cf527e2e8571da73210e6d36a4fe7e
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version 36a9c86df5cf527e2e8571da73210e6d36a4fe7e
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
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to alveusesbot.
remote:
To https://git.heroku.com/alveusesbot.git
 ! [remote rejected] master -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/alveusesbot.git'

Я новичок в git и heroku, и я не понимаю, почему возникает эта проблема и как ее исправить. Я пробовал много решений в Интернете, и ни одно не сработало. Любая помощь очень помогает.

Ответы

Aarav Dec 08 2020 at 01:57

В нем говорится, The same version of this code has already been builtчто, вероятно, означает, что вы не обновляли код. Вам нужно сделать коммит.

  1. Беги git statusпосмотреть, что ты поставил. В нем должны быть инструкции по постановке.
  2. Затем бегите git commit -m "description"с описанием. Он должен зафиксировать все подготовленные файлы.
  3. Наконец, запустите команду, которую вы выполняли, git push heroku master:mainчтобы отправить / обновить изменения в heroku.
    Больше информации о git можно найти здесь .