Git / gerrit, push remote rejected no changes made

前端 未结 9 1605
说谎
说谎 2020-12-22 23:45

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)
         


        
9条回答
  •  情书的邮戳
    2020-12-23 00:17

    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:

    1. If you just want to quickly get around this issue, do 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.
    2. Go into gerrit and search for your existing change-Id, figure out what is going on, and fix accordingly. (recommended)

提交回复
热议问题