gerrit: push: no changes between prior commit and new commit. Not able to pull changes
gerrit, git
Solution
Since you're pushing a new patch set 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 rebased it) and has not been submitted to master, you can't directly fetch/pull from master as it does not exists in the remote branch.
You need to fetch the commit from gerrit to your local repo using the gerrit URL and then merging/rebasing your local repo. The 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 cherry-pick a commit, which applies the changes introduced by some existing commit but creates a new SHA hash, and we try to push changes on top of this new local commit.
Problem
i try 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 the problem, that an already pushed commit was rebased from an other gerrit user using the gerrit webinterface. So gerrit is telling me: ``` No changes between prior commit xxxx and new commit xxxx ``` Now i thougt i had to pull the rebased patch set to solve that issue. But if i try to ``` git fetch master ``` or ``` git pull ``` git tells me: ``` Already up-to-date ``` so I'm not able to pull the rebased patch set.. Can someone help?