Duplicate build version detected
Last updated September 10, 2020
This article is a work in progress, or documents a feature that is not yet released to all users. This article is unlisted. Only those with the link can access it.
Deploying the same version of your application multiple times may be an indication that you are pushing code to Heroku incorrectly. This article explains how this duplicate deploys with the same code version are possible, and how to diagnose and fix the issue.
Diagnosing uncommitted local files
Verify that all of your local changes are committed:
$ git status On branch main nothing to commit, working tree clean
If you do not see “nothing to commit” then you have code changes that have not been checked in. You can run this to add them:
$ git add -A $ git commit -m "code"
You should be able to run
git status again to verify there is nothing left to commit again. Deploy to Heroku again.
Diagnosing deploying from a different branch
If you are seeing the duplicate deploy warning when you push your code, but all of your files are committed locally, then you may be attempting to deploy from a branch. If you are on a branch different than the one you are trying to deploy to on Heroku (
master) then when you run:
$ git push heroku main
Following changes in the industry, Heroku has updated our default git branch name to
main. If the project you’re deploying uses
master as its default branch name, use
git push heroku master.
This is a shortcut for:
$ git push heroku main:main
It means you are telling git to push the contents of your master branch to the master branch of the Heroku remote. If you are on a different branch, you must specify it manually:
$ git push heroku <mybranchname>:main
For example, if you’re currently developing on a branch called
my_staging_branch then the command would be:
$ git push heroku my_staging_branch:main