do_for_each_reflog(): use a strbuf to hold logfile name
[gitweb.git] / Documentation / git-push.txt
index aede48877fb080bd12c346c74cf7453860d7de21..a52b7b1a1985ae84d1de8f0cfd107928c648d469 100644 (file)
@@ -10,7 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
-          [--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
+          [--repo=<repository>] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
           [<repository> [<refspec>...]]
 
 DESCRIPTION
@@ -71,6 +71,14 @@ nor in any Push line of the corresponding remotes file---see below).
        Instead of naming each ref to push, specifies that all
        refs under `refs/heads/` be pushed.
 
+--prune::
+       Remove remote branches that don't have a local counterpart. For example
+       a remote branch `tmp` will be removed if a local branch with the same
+       name doesn't exist any more. This also respects refspecs, e.g.
+       `git push --prune remote refs/heads/{asterisk}:refs/tmp/{asterisk}` would
+       make sure that remote `refs/tmp/foo` will be removed if `refs/heads/foo`
+       doesn't exist.
+
 --mirror::
        Instead of naming each ref to push, specifies that all
        refs under `refs/` (which includes but is not
@@ -162,10 +170,16 @@ useful if you write an alias or script around 'git push'.
        is specified. This flag forces progress status even if the
        standard error stream is not directed to a terminal.
 
---recurse-submodules=check::
-       Check whether all submodule commits used by the revisions to be
-       pushed are available on a remote tracking branch. Otherwise the
-       push will be aborted and the command will exit with non-zero status.
+--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.
 
 
 include::urls-remotes.txt[]