-1
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'

I am new to git and heroku and I do not understand why this problem is caused and how to fix it I have tried many solutions online and none worked. Any help is of great help.

David_Can
  • 21
  • 5

1 Answers1

0

It says The same version of this code has already been built which probably means that you haven't updated the code. You need to do a commit.

  1. Run git status to see what you have staged. It should have directions for how to stage.
  2. Then run git commit -m "description" with the description. It should commit all staged files.
  3. Finally, run the command you were doing, git push heroku master:main, to push/update the changes to heroku.
    More info about git is here.
Aarav
  • 79
  • 2
  • 6
  • 3
    The "app not compatible with buildpack" error is far more important than the warning. – ceejayoz Dec 07 '20 at 19:01
  • Didn't notice that, I'll check now. – Aarav Dec 07 '20 at 19:04
  • Can't comment on the main question so I'll do it here. @David_Can What language is your code? By not compatible I think it means unsupported language. Is your language one of the supported types (Node.js, Ruby, Python, Java, PHP, Go, Scala, Clojure)? Or do you have a config file and or hosting a server? – Aarav Dec 07 '20 at 19:18
  • @Aarav my app is python. I have declared the build pack but I don't know what else it wants also the other error has gone away. – David_Can Dec 07 '20 at 19:36
  • @David_Can Do you have a `requirments.txt` or a `setup.py` file. The error seems to be in the build source section. Or you might have to [set](https://devcenter.heroku.com/articles/buildpacks#setting-a-buildpack-on-an-application) a buildpack. – Aarav Dec 07 '20 at 20:14