Merge git://repo.or.cz/git-gui
[gitweb.git] / Documentation / git-push.txt
index 9d8c379717f2618746fc32baa84a771160e8364a..050c3ddae2732fdf4cb9f3b0f798e3d2d190fa4e 100644 (file)
@@ -9,8 +9,9 @@ git-push - Update remote refs along with associated objects
 SYNOPSIS
 --------
 [verse]
-'git-push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]
-           [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]
+'git push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]
+          [--repo=all] [-f | --force] [-v | --verbose]
+          [<repository> <refspec>...]
 
 DESCRIPTION
 -----------
@@ -29,8 +30,8 @@ OPTIONS
        The "remote" repository that is destination of a push
        operation.  See the section <<URLS,GIT URLS>> below.
 
-<refspec>::
-       The canonical format of a <refspec> parameter is
+<refspec>...::
+       The canonical format of each <refspec> parameter is
        `+?<src>:<dst>`; that is, an optional plus `+`, followed
        by the source ref, followed by a colon `:`, followed by
        the destination ref.
@@ -61,13 +62,14 @@ already exists on the remote side.  This is the default operation mode
 if no explicit refspec is found (that is neither on the command line
 nor in any Push line of the corresponding remotes file---see below).
 
-\--all::
+--all::
        Instead of naming each ref to push, specifies that all
        refs under `$GIT_DIR/refs/heads/` be pushed.
 
-\--mirror::
+--mirror::
        Instead of naming each ref to push, specifies that all
-       refs under `$GIT_DIR/refs/heads/` and `$GIT_DIR/refs/tags/`
+       refs under `$GIT_DIR/refs/` (which includes but is not
+       limited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`)
        be mirrored to the remote repository.  Newly created local
        refs will be pushed to the remote end, locally updated refs
        will be force updated on the remote end, and deleted refs
@@ -75,39 +77,42 @@ nor in any Push line of the corresponding remotes file---see below).
        if the configuration option `remote.<remote>.mirror` is
        set.
 
-\--dry-run::
+--dry-run::
        Do everything except actually send the updates.
 
-\--tags::
+--tags::
        All refs under `$GIT_DIR/refs/tags` are pushed, in
        addition to refspecs explicitly listed on the command
        line.
 
-\--receive-pack=<git-receive-pack>::
+--receive-pack=<git-receive-pack>::
        Path to the 'git-receive-pack' program on the remote
        end.  Sometimes useful when pushing to a remote
        repository over ssh, and you do not have the program in
        a directory on the default $PATH.
 
-\--exec=<git-receive-pack>::
+--exec=<git-receive-pack>::
        Same as \--receive-pack=<git-receive-pack>.
 
--f, \--force::
+-f::
+--force::
        Usually, the command refuses to update a remote ref that is
        not an ancestor of the local ref used to overwrite it.
        This flag disables the check.  This can cause the
        remote repository to lose commits; use it with care.
 
-\--repo=<repo>::
+--repo=<repo>::
        When no repository is specified the command defaults to
        "origin"; this overrides it.
 
-\--thin, \--no-thin::
-       These options are passed to `git-send-pack`.  Thin
+--thin::
+--no-thin::
+       These options are passed to 'git-send-pack'.  Thin
        transfer spends extra cycles to minimize the number of
        objects to be sent and meant to be used on slower connection.
 
--v, \--verbose::
+-v::
+--verbose::
        Run verbosely.
 
 include::urls-remotes.txt[]
@@ -176,11 +181,11 @@ git push origin :experimental::
        Find a ref that matches `experimental` in the `origin` repository
        (e.g. `refs/heads/experimental`), and delete it.
 
-git push origin master:satellite/master::
-       Find a ref that matches `master` in the source repository
-       (most likely, it would find `refs/heads/master`), and update
-       the ref that matches `satellite/master` (most likely, it would
-       be `refs/remotes/satellite/master`) in `origin` repository with it.
+git push origin master:satellite/master dev:satellite/dev::
+       Use the source ref that matches `master` (e.g. `refs/heads/master`)
+       to update the ref that matches `satellite/master` (most probably
+       `refs/remotes/satellite/master`) in the `origin` repository, then
+       do the same for `dev` and `satellite/dev`.
 
 git push origin master:refs/heads/experimental::
        Create the branch `experimental` in the `origin` repository
@@ -191,7 +196,7 @@ git push origin master:refs/heads/experimental::
 
 Author
 ------
-Written by Junio C Hamano <junkio@cox.net>, later rewritten in C
+Written by Junio C Hamano <gitster@pobox.com>, later rewritten in C
 by Linus Torvalds <torvalds@osdl.org>
 
 Documentation