I have accidentally pushed a change to gerrit that should have been pushed as a draft. Now I'd like to unpublish the change back to a draft.
Pushing it again to refs/drafts/*
doesn't work as it isn't changed.
Update:
I followed the suggestions of mvp and HiB; I abandoned the change, amended the commit message (removing the change-id, letting the post-commit hook generate a new change-id) and pushed it again. This resulted in a 'new' draft change. At first it looks OK, but history etc. isn't preserved of course. Not a big issue, but not the clean solution I'm looking for.
Once a change is published you cannot set it back to draft, but you may create new draft patch sets for a published change.
来源:https://stackoverflow.com/questions/18842628/unpublish-gerrit-change