简体   繁体   中英

How to remove WIP flag from Gerrit changeset with Git

I've pushed a work-in-progress (WIP) changeset to Gerrit by pushing to refs/for/master%wip , as per the documentation .

The documentation also states that one can remove the WIP flag from a changeset by pushing it to refs/for/master%ready , but Gerrit consistently rejects the push with the error

! [remote rejected] mybranch -> refs/for/master%ready (no new changes)

Force-pushing doesn't help either.

Is there a way to remove the WIP flag via Git without introducing artificial changes?

In case you don't have anything to push, but you want to mark your commit as ready, you can execute the following commands:

git commit --amend --no-edit
git push origin HEAD:refs/for/master%ready ==> replace "master" with your branch name.

Unfortunately you can't set the WIP flag using the "git push" command without pushing a new patchset.

You can, of course, use the graphical interface or you can post to /changes/CHANGE-ID/ready to set the WIP flag using REST. See more info here .

You can always remove flag using GUI by pressing start review button.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM