gerrit ban-commit - Bans a commit from a project’s repository.
ssh -p <port> <host> gerrit ban-commit [--reason <REASON>] <PROJECT> <COMMIT> …
Marks a commit as banned for the specified repository. If a commit is banned Gerrit rejects every push that includes this commit with contains banned commit ….
This command just marks the commit as banned, but it does not remove the commit from the history of any central branch. This needs to be done manually.
Caller must be owner of the project or be a member of the privileged Administrators group.
This command is intended to be used in scripts.
Required; name of the project for which the commit should be banned.
Required; commit(s) that should be banned.
Reason for banning the commit.
421919d015c062fd28901fe144a78a555d0b5984 from project
$ ssh -p 29418 review.example.com gerrit ban-commit myproject \ 421919d015c062fd28901fe144a78a555d0b5984
Part of Gerrit Code Review