Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force push to Gerrit even with no new changes

Tags:

git

push

gerrit

I want to push a patchset to Gerrit which has already been pushed. Originally when the patches were sent up, the build system did not trigger. I need to trigger it again by resubmitting all patches.

Gerrit rejects this with

 ! [remote rejected] HEAD -> refs/for/branch (no new changes)

I know there are no new changes but I want to push anyway. How can I do this?

--force flag has no effect.

like image 493
Fred Avatar asked Dec 16 '25 19:12

Fred


1 Answers

Execute "commit --amend, change the commit message and push again.

like image 159
Marcelo Ávila de Oliveira Avatar answered Dec 19 '25 14:12

Marcelo Ávila de Oliveira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!