path: root/Documentation/git-push.txt
diff options
authorMarius Paliga <>2017-10-23 11:44:49 (GMT)
committerJunio C Hamano <>2017-10-24 00:57:54 (GMT)
commitd8052750c5fdd53cb5a664a18ce9d78dbedb22ae (patch)
tree41a7ad7ed930564c6a1e788976fa42bfe447c6ba /Documentation/git-push.txt
parent4843cdefe3f30d19c1b2cf601522152c1413459a (diff)
builtin/push.c: add push.pushOption config
Push options need to be given explicitly, via the command line as "git push --push-option <option>". Add the config option push.pushOption, which is a multi-valued option, containing push options that are sent by default. When push options are set in the lower-priority configulation file (e.g. /etc/gitconfig, or $HOME/.gitconfig), they can be unset later in the more specific repository config by the empty string. Add tests and update documentation as well. Signed-off-by: Marius Paliga <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-push.txt')
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 3e76e99..5b08302 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -156,11 +156,17 @@ already exists on the remote side.
Either all refs are updated, or on error, no refs are updated.
If the server does not support atomic pushes the push will fail.
+-o <option>::
Transmit the given string to the server, which passes them to
the pre-receive as well as the post-receive hook. The given string
must not contain a NUL or LF character.
+ When multiple `--push-option=<option>` are given, they are
+ all sent to the other side in the order listed on the
+ command line.
+ When no `--push-option=<option>` is given from the command
+ line, the values of configuration variable `push.pushOption`
+ are used instead.