Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with the Play Framework
      • Java Advanced Topics
      • Working with Spring Boot
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Deployment
  • Duplicate Build Version Detected

Duplicate Build Version Detected

English — 日本語に切り替える

Last updated March 21, 2022

Table of Contents

  • Diagnosing Uncommitted Local Files
  • Diagnosing Deploys From a Different Branch

Deploying the same version of your application multiple times can be an indication that you are pushing code to Heroku incorrectly. This article explains how these duplicate deploys with the same code version are possible, and how to diagnose and fix the issue.

Diagnosing Uncommitted Local Files

Verify that you committed all of your local changes:

$ git status
On branch main
nothing to commit, working tree clean

If you don’t see “nothing to commit”, you must check in your code changes. Run this command to add them all:

$ git add -A
$ git commit -m "code"

Run git status again to verify there’s nothing left to commit. Deploy to Heroku.

Diagnosing Deploys From a Different Branch

If you’re seeing the duplicate deploy warning when you push your code, and all of your files are committed locally, check if you’re attempting to deploy from another branch. If you’re on a branch that’s different than the one you’re trying to deploy to on Heroku (main), 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 command is a shortcut for:

$ git push heroku main:main

It means you’re telling git to push the contents of your main branch to the main branch of the Heroku remote. If you’re 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 and want to push that to main on the Heroku remote, the command is:

$ git push heroku my_staging_branch:main

Keep reading

  • Deployment

Feedback

Log in to submit feedback.

Preparing a Codebase for Heroku Deployment Preparing a Codebase for Heroku Deployment

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences