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?
It is also possible to set a topic on push, either by appending %topic=… to the ref name or through the use of the command line flag --push-option , aliased to -o , followed by topic=… . Gerrit may be configured to submit all changes in a topic together with a single click, even when topics span multiple projects.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With