summaryrefslogtreecommitdiff
path: root/Documentation/git-push.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-push.txt')
-rw-r--r--Documentation/git-push.txt62
1 files changed, 45 insertions, 17 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 85a4d7d..1624a35 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -10,8 +10,8 @@ SYNOPSIS
--------
[verse]
'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
- [--repo=<repository>] [-f | --force] [--prune] [-v | --verbose]
- [-u | --set-upstream]
+ [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]
+ [-u | --set-upstream] [--push-option=<string>]
[--[no-]signed|--sign=(true|false|if-asked)]
[--force-with-lease[=<refname>[:<expect>]]]
[--no-verify] [<repository> [<refspec>...]]
@@ -37,6 +37,13 @@ the default `<refspec>` by consulting `remote.*.push` configuration,
and if it is not found, honors `push.default` configuration to decide
what to push (See linkgit:git-config[1] for the meaning of `push.default`).
+When neither the command-line nor the configuration specify what to
+push, the default behavior is used, which corresponds to the `simple`
+value for `push.default`: the current branch is pushed to the
+corresponding upstream branch, but as a safety measure, the push is
+aborted if the upstream branch does not have the same name as the
+local one.
+
OPTIONS[[OPTIONS]]
------------------
@@ -130,8 +137,8 @@ already exists on the remote side.
and also push annotated tags in `refs/tags` that are missing
from the remote but are pointing at commit-ish that are
reachable from the refs being pushed. This can also be specified
- with configuration variable 'push.followTags'. For more
- information, see 'push.followTags' in linkgit:git-config[1].
+ with configuration variable `push.followTags`. For more
+ information, see `push.followTags` in linkgit:git-config[1].
--[no-]signed::
--sign=(true|false|if-asked)::
@@ -149,6 +156,12 @@ 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::
+--push-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.
+
--receive-pack=<git-receive-pack>::
--exec=<git-receive-pack>::
Path to the 'git-receive-pack' program on the remote
@@ -191,10 +204,11 @@ branch we have for it.
+
`--force-with-lease=<refname>:<expect>` will protect the named ref (alone),
if it is going to be updated, by requiring its current value to be
-the same as the specified value <expect> (which is allowed to be
+the same as the specified value `<expect>` (which is allowed to be
different from the remote-tracking branch we have for the refname,
or we do not even have to have such a remote-tracking branch when
-this form is used).
+this form is used). If `<expect>` is the empty string, then the named ref
+must not already exist.
+
Note that all forms other than `--force-with-lease=<refname>:<expect>`
that specifies the expected current value of the ref explicitly are
@@ -233,7 +247,7 @@ origin +master` to force a push to the `master` branch). See the
For every branch that is up to date or successfully pushed, add
upstream (tracking) reference, used by argument-less
linkgit:git-pull[1] and other commands. For more information,
- see 'branch.<name>.merge' in linkgit:git-config[1].
+ see `branch.<name>.merge` in linkgit:git-config[1].
--[no-]thin::
These options are passed to linkgit:git-send-pack[1]. A thin transfer
@@ -257,22 +271,34 @@ origin +master` to force a push to the `master` branch). See the
is specified. This flag forces progress status even if the
standard error stream is not directed to a terminal.
---recurse-submodules=check|on-demand::
- Make sure all submodule commits used by the revisions to be
- pushed are available on a remote-tracking branch. If 'check' is
- used Git will verify that all submodule commits that changed in
- the revisions to be pushed are available on at least one remote
- of the submodule. If any commits are missing the push will be
- aborted and exit with non-zero status. If 'on-demand' is used
- all submodules that changed in the revisions to be pushed will
- be pushed. If on-demand was not able to push all necessary
- revisions it will also be aborted and exit with non-zero status.
+--no-recurse-submodules::
+--recurse-submodules=check|on-demand|only|no::
+ May be used to make sure all submodule commits used by the
+ revisions to be pushed are available on a remote-tracking branch.
+ If 'check' is used Git will verify that all submodule commits that
+ changed in the revisions to be pushed are available on at least one
+ remote of the submodule. If any commits are missing the push will
+ be aborted and exit with non-zero status. If 'on-demand' is used
+ all submodules that changed in the revisions to be pushed will be
+ pushed. If on-demand was not able to push all necessary revisions it will
+ also be aborted and exit with non-zero status. If 'only' is used all
+ submodules will be recursively pushed while the superproject is left
+ unpushed. A value of 'no' or using `--no-recurse-submodules` can be used
+ to override the push.recurseSubmodules configuration variable when no
+ submodule recursion is required.
--[no-]verify::
Toggle the pre-push hook (see linkgit:githooks[5]). The
default is --verify, giving the hook a chance to prevent the
push. With --no-verify, the hook is bypassed completely.
+-4::
+--ipv4::
+ Use IPv4 addresses only, ignoring IPv6 addresses.
+
+-6::
+--ipv6::
+ Use IPv6 addresses only, ignoring IPv4 addresses.
include::urls-remotes.txt[]
@@ -534,6 +560,8 @@ Commits A and B would no longer belong to a branch with a symbolic name,
and so would be unreachable. As such, these commits would be removed by
a `git gc` command on the origin repository.
+include::transfer-data-leaks.txt[]
+
GIT
---
Part of the linkgit:git[1] suite