title: Heroku - Error during git push/deployment, The same version of this code has already been built
body: <p>I have a problem deploying my springboot application to Heroku. After running <code>git push heroku master</code>, I am encountering the error below:</p>
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  9.350 s
  [INFO] Finished at: 2020-12-22T06:33:14Z
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project audit: Fatal error compiling: invalid target release: 11 -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  [ERROR] 
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;args&gt; -rf :audit
  remote:  !     Push rejected, failed to compile Java app.
  remote: 
  remote:  !     Push failed
  remote:  !
  remote:  ! ## Warning - The same version of this code has already been built:             31199a7acec03a3cb614ebaaf6c7720cee6684bd
  remote:  !
  remote:  ! We have detected that you have triggered a build from source code with version 31199a7acec03a3cb614ebaaf6c7720cee6684bd
  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 &lt;branchname&gt;: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 tesda8app.
  </code></pre>
  <p>I am clueless into why this error occurred. I have two remote repositories on which I push my code, one from Heroku and one in Github. I have tried the command below based from the answer from this question, <a href="https://stackoverflow.com/questions/64265355/heroku-if-you-are-developing-on-a-branch-and-deploying-via-git-you-must-run">Heroku: If you are developing on a branch and deploying via git you must run:</a></p>
  <pre><code>git push heroku master:main
  </code></pre>
  <p>But still the error persists. Is there any command that I could try on the Heroku CLI to solve this problem?</p>