Made changes to a commit, performed commit amend. Do a push and I get the error:
! [remote rejected] master -> refs/for/master (no changes made)
Please refer to the official documentation on this issue here:
https://gerrit-review.googlesource.com/Documentation/error-no-new-changes.html
I had the same issue, my issue was that I pushed the change, then abandoned that merge, then I made a few tweaks, wrongfully amended my commit and pushed again. That is where I got the error.
My fix:
git commit --amend
, remove the existing change-Id
, assuming you have the git hooks set up, you can finish the commit and a new change-Id
should be assigned to you. change-Id
, figure out what is going on, and fix accordingly. (recommended) If you are trying to update a set of reviews, each with their own change-id that you want to maintain (say, after a rebase where you swap the order of two commits), you might get rejected if some of the commits in the pile remain unchanged. You should force a new hash to be generated by rewording the commits, or something similar.
With this error message Gerrit rejects to push a commit as a new patch set for a change, if the pushed commit is identical to the current patch set of this change.
A pushed commit is considered to be identical to the current patch set if
are all identical.
I had the same error message, but the changes I was trying to push were on top of different commits from the original Change set (did some magic tricks with git cherry-pick
and it seems gerrit did not like it). I abandoned my original change, then reopened it when I realized I could fix the issue, but failed to send to gerrit with git review
.
At this point, my quick solution was to abandon the original change from gerrit website, and create a new change by removing the change-Id: sha1
last line from the commit message with git commit --amend
.
i had the same issue. Just changed the commit message and pushed the code. It was successful.
I had the same issue. At the same time there was another commit not merged to master and was in gerrit review and rebased in gerrit. i.e. code pushed for review. rebased in gerrit and review pending to finish. Once the code was reviewed I was able to push without error.