summaryrefslogtreecommitdiffstats
path: root/Documentation/cmd-ban-commit.txt
blob: fb4a2ac97c17674c4d009625d4e9ced7a4fbcd91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
gerrit ban-commit
=================

NAME
----
gerrit ban-commit - Bans a commit from a project's repository.

SYNOPSIS
--------
[verse]
'ssh' -p <port> <host> 'gerrit ban-commit'
  [--reason <REASON>]
  <PROJECT>
  <COMMIT> ...

DESCRIPTION
-----------
Marks a commit as banned for the specified repository.  If a commit is
banned Gerrit rejects every push that includes this commit with
link:error-contains-banned-commit.html[contains banned commit ...].

[NOTE]
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.

ACCESS
------
Caller must be owner of the project or be a member of the privileged
'Administrators' group.

SCRIPTING
---------
This command is intended to be used in scripts.

OPTIONS
-------
<PROJECT>::
	Required; name of the project for which the commit should be
	banned.

<COMMIT>::
	Required; commit(s) that should be banned.

--reason::
	Reason for banning the commit.

EXAMPLES
--------
Ban commit `421919d015c062fd28901fe144a78a555d0b5984` from project
`myproject`:

====
	$ ssh -p 29418 review.example.com gerrit ban-commit myproject \
	421919d015c062fd28901fe144a78a555d0b5984
====

GERRIT
------
Part of link:index.html[Gerrit Code Review]