Documentation / git-send-pack.txton commit Update documentation of fetch-pack, push and send-pack (18bd882)
   1git-send-pack(1)
   2================
   3
   4NAME
   5----
   6git-send-pack - Push objects over git protocol to another reposiotory
   7
   8
   9SYNOPSIS
  10--------
  11'git-send-pack' [--all] [--force] [--exec=<git-receive-pack>] [--verbose] [--thin] [<host>:]<directory> [<ref>...]
  12
  13DESCRIPTION
  14-----------
  15Usually you would want to use gitlink:git-push[1] which is a
  16higher level wrapper of this command instead.
  17
  18Invokes 'git-receive-pack' on a possibly remote repository, and
  19updates it from the current repository, sending named refs.
  20
  21
  22OPTIONS
  23-------
  24\--exec=<git-receive-pack>::
  25        Path to the 'git-receive-pack' program on the remote
  26        end.  Sometimes useful when pushing to a remote
  27        repository over ssh, and you do not have the program in
  28        a directory on the default $PATH.
  29
  30\--all::
  31        Instead of explicitly specifying which refs to update,
  32        update all refs that locally exist.
  33
  34\--force::
  35        Usually, the command refuses to update a remote ref that
  36        is not an ancestor of the local ref used to overwrite it.
  37        This flag disables the check.  What this means is that
  38        the remote repository can lose commits; use it with
  39        care.
  40
  41\--verbose::
  42        Run verbosely.
  43
  44\--thin::
  45        Spend extra cycles to minimize the number of objects to be sent.
  46        Use it on slower connection.
  47
  48<host>::
  49        A remote host to house the repository.  When this
  50        part is specified, 'git-receive-pack' is invoked via
  51        ssh.
  52
  53<directory>::
  54        The repository to update.
  55
  56<ref>...::
  57        The remote refs to update.
  58
  59
  60Specifying the Refs
  61-------------------
  62
  63There are three ways to specify which refs to update on the
  64remote end.
  65
  66With '--all' flag, all refs that exist locally are transferred to
  67the remote side.  You cannot specify any '<ref>' if you use
  68this flag.
  69
  70Without '--all' and without any '<ref>', the refs that exist
  71both on the local side and on the remote side are updated.
  72
  73When one or more '<ref>' are specified explicitly, it can be either a
  74single pattern, or a pair of such pattern separated by a colon
  75":" (this means that a ref name cannot have a colon in it).  A
  76single pattern '<name>' is just a shorthand for '<name>:<name>'.
  77
  78Each pattern pair consists of the source side (before the colon)
  79and the destination side (after the colon).  The ref to be
  80pushed is determined by finding a match that matches the source
  81side, and where it is pushed is determined by using the
  82destination side.
  83
  84 - It is an error if <src> does not match exactly one of the
  85   local refs.
  86
  87 - It is an error if <dst> matches more than one remote refs.
  88
  89 - If <dst> does not match any remote ref, either
  90
  91   * it has to start with "refs/"; <dst> is used as the
  92     destination literally in this case.
  93
  94   * <src> == <dst> and the ref that matched the <src> must not
  95     exist in the set of remote refs; the ref matched <src>
  96     locally is used as the name of the destination.
  97
  98Without '--force', the <src> ref is stored at the remote only if
  99<dst> does not exist, or <dst> is a proper subset (i.e. an
 100ancestor) of <src>.  This check, known as "fast forward check",
 101is performed in order to avoid accidentally overwriting the
 102remote ref and lose other peoples' commits from there.
 103
 104With '--force', the fast forward check is disabled for all refs.
 105
 106Optionally, a <ref> parameter can be prefixed with a plus '+' sign
 107to disable the fast-forward check only on that ref.
 108
 109
 110Author
 111------
 112Written by Linus Torvalds <torvalds@osdl.org>
 113
 114Documentation
 115--------------
 116Documentation by Junio C Hamano.
 117
 118GIT
 119---
 120Part of the gitlink:git[7] suite