Gerrit: push: no changes between the previous commit and the new commit. Failed to pull changes

I am trying to push my new patch sets of my already made commits. I use the command

git push origin HEAD:refs/for/master 

But now I have a problem that the already pressed commit was reinstalled from another gerrit user using the gerrit web interface. So says Gerrit:

 No changes between prior commit xxxx and new commit xxxx 

Now I had to pull out a set of patches to fix this problem. But if I try

 git fetch master 

or

 git pull 

git tells me:

 Already up-to-date 

therefore, I cannot pull out a set of patched patches. Can anyone help?

+5
source share
1 answer

As you click on the new patch installed in gerrit, the changes should be on top of the existing commit SHA hash.

Since the rebased commit is local to gerrit (also probably to the user who reinstalls it) and was not sent to master, you cannot directly fetch / fetch from master since it does not exist in the remote branch.

You need to get a commit from gerrit to your local repo using the gerrit url and then merge / restore your local repo. Gerrit refspec should have the following format.

 git fetch <Gerrit URL> <refs/changes/<change id>/<gerrit id>/<patch set #>> 

This git push issue is also reported when we select commit, which applies the changes introduced by some existing commits, but creates a new SHA hash, and we try to make changes on top of this new local commit.

+5
source

Source: https://habr.com/ru/post/1214313/


All Articles