Documentation / git-push.txton commit Merge branch 'maint' (78e90f8)
   1git-push(1)
   2===========
   3
   4NAME
   5----
   6git-push - Update remote refs along with associated objects
   7
   8
   9SYNOPSIS
  10--------
  11'git-push' [--all] [--tags] [--receive-pack=<git-receive-pack>] [--repo=all] [-f | --force] [-v] [<repository> <refspec>...]
  12
  13DESCRIPTION
  14-----------
  15
  16Updates remote refs using local refs, while sending objects
  17necessary to complete the given refs.
  18
  19You can make interesting things happen to a repository
  20every time you push into it, by setting up 'hooks' there.  See
  21documentation for gitlink:git-receive-pack[1].
  22
  23
  24OPTIONS
  25-------
  26<repository>::
  27        The "remote" repository that is destination of a push
  28        operation.  See the section <<URLS,GIT URLS>> below.
  29
  30<refspec>::
  31        The canonical format of a <refspec> parameter is
  32        `+?<src>:<dst>`; that is, an optional plus `+`, followed
  33        by the source ref, followed by a colon `:`, followed by
  34        the destination ref.
  35+
  36The <src> side can be an
  37arbitrary "SHA1 expression" that can be used as an
  38argument to `git-cat-file -t`.  E.g. `master~4` (push
  39four parents before the current master head).
  40+
  41The local ref that matches <src> is used
  42to fast forward the remote ref that matches <dst>.  If
  43the optional plus `+` is used, the remote ref is updated
  44even if it does not result in a fast forward update.
  45+
  46Note: If no explicit refspec is found, (that is neither
  47on the command line nor in any Push line of the
  48corresponding remotes file---see below), then all the
  49refs that exist both on the local side and on the remote
  50side are updated.
  51+
  52`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
  53+
  54A parameter <ref> without a colon is equivalent to
  55<ref>`:`<ref>, hence updates <ref> in the destination from <ref>
  56in the source.
  57+
  58Pushing an empty <src> allows you to delete the <dst> ref from
  59the remote repository.
  60
  61\--all::
  62        Instead of naming each ref to push, specifies that all
  63        refs be pushed.
  64
  65\--tags::
  66        All refs under `$GIT_DIR/refs/tags` are pushed, in
  67        addition to refspecs explicitly listed on the command
  68        line.
  69
  70\--receive-pack=<git-receive-pack>::
  71        Path to the 'git-receive-pack' program on the remote
  72        end.  Sometimes useful when pushing to a remote
  73        repository over ssh, and you do not have the program in
  74        a directory on the default $PATH.
  75
  76\--exec=<git-receive-pack>::
  77        Same as \--receive-pack=<git-receive-pack>.
  78
  79-f, \--force::
  80        Usually, the command refuses to update a remote ref that is
  81        not a descendant of the local ref used to overwrite it.
  82        This flag disables the check.  This can cause the
  83        remote repository to lose commits; use it with care.
  84
  85\--repo=<repo>::
  86        When no repository is specified the command defaults to
  87        "origin"; this overrides it.
  88
  89\--thin, \--no-thin::
  90        These options are passed to `git-send-pack`.  Thin
  91        transfer spends extra cycles to minimize the number of
  92        objects to be sent and meant to be used on slower connection.
  93
  94-v::
  95        Run verbosely.
  96
  97include::urls.txt[]
  98
  99Author
 100------
 101Written by Junio C Hamano <junkio@cox.net>, later rewritten in C
 102by Linus Torvalds <torvalds@osdl.org>
 103
 104Documentation
 105--------------
 106Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 107
 108GIT
 109---
 110Part of the gitlink:git[7] suite
 111