2005-07-14 09:10:05 +02:00
|
|
|
git-send-pack(1)
|
|
|
|
================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2013-01-21 20:17:53 +01:00
|
|
|
git-send-pack - Push objects over Git protocol to another repository
|
2005-07-14 09:10:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-07-02 04:38:26 +02:00
|
|
|
[verse]
|
2015-08-19 17:26:40 +02:00
|
|
|
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
|
2015-08-19 17:26:46 +02:00
|
|
|
[--verbose] [--thin] [--atomic]
|
|
|
|
[--[no-]signed|--sign=(true|false|if-asked)]
|
2015-08-19 17:26:40 +02:00
|
|
|
[<host>:]<directory> [<ref>...]
|
2005-07-14 09:10:05 +02:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2010-01-10 00:33:00 +01:00
|
|
|
Usually you would want to use 'git push', which is a
|
2008-06-30 20:56:34 +02:00
|
|
|
higher-level wrapper of this command, instead. See linkgit:git-push[1].
|
2007-01-17 22:03:29 +01:00
|
|
|
|
2008-07-03 07:41:41 +02:00
|
|
|
Invokes 'git-receive-pack' on a possibly remote repository, and
|
2005-08-25 01:23:08 +02:00
|
|
|
updates it from the current repository, sending named refs.
|
2005-07-14 09:10:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2008-06-08 03:36:09 +02:00
|
|
|
--receive-pack=<git-receive-pack>::
|
2008-07-03 07:41:41 +02:00
|
|
|
Path to the 'git-receive-pack' program on the remote
|
2005-07-14 09:10:05 +02:00
|
|
|
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.
|
|
|
|
|
2008-06-08 03:36:09 +02:00
|
|
|
--exec=<git-receive-pack>::
|
2015-05-13 07:01:38 +02:00
|
|
|
Same as --receive-pack=<git-receive-pack>.
|
2007-01-19 13:49:27 +01:00
|
|
|
|
2008-06-08 03:36:09 +02:00
|
|
|
--all::
|
2005-08-04 02:15:44 +02:00
|
|
|
Instead of explicitly specifying which refs to update,
|
2007-09-18 10:15:34 +02:00
|
|
|
update all heads that locally exist.
|
2005-08-04 02:15:44 +02:00
|
|
|
|
2014-08-21 14:21:20 +02:00
|
|
|
--stdin::
|
|
|
|
Take the list of refs from stdin, one per line. If there
|
|
|
|
are refs specified on the command line in addition to this
|
|
|
|
option, then the refs from stdin are processed after those
|
|
|
|
on the command line.
|
|
|
|
+
|
2016-06-28 13:40:11 +02:00
|
|
|
If `--stateless-rpc` is specified together with this option then
|
2014-08-21 14:21:20 +02:00
|
|
|
the list of refs must be in packet format (pkt-line). Each ref must
|
|
|
|
be in a separate packet, and the list must end with a flush packet.
|
|
|
|
|
2008-06-08 03:36:09 +02:00
|
|
|
--dry-run::
|
2007-10-11 21:32:26 +02:00
|
|
|
Do everything except actually send the updates.
|
|
|
|
|
2008-06-08 03:36:09 +02:00
|
|
|
--force::
|
2005-08-25 01:23:08 +02:00
|
|
|
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. What this means is that
|
|
|
|
the remote repository can lose commits; use it with
|
|
|
|
care.
|
|
|
|
|
2008-06-08 03:36:09 +02:00
|
|
|
--verbose::
|
2007-01-19 13:43:00 +01:00
|
|
|
Run verbosely.
|
|
|
|
|
2008-06-08 03:36:09 +02:00
|
|
|
--thin::
|
2010-02-18 10:10:28 +01:00
|
|
|
Send a "thin" pack, which records objects in deltified form based
|
|
|
|
on objects not included in the pack to reduce network traffic.
|
2007-01-19 13:43:00 +01:00
|
|
|
|
2015-01-08 04:23:22 +01:00
|
|
|
--atomic::
|
|
|
|
Use an atomic transaction for updating the refs. If any of the refs
|
|
|
|
fails to update then the entire push will fail without changing any
|
|
|
|
refs.
|
|
|
|
|
2015-08-19 17:26:46 +02:00
|
|
|
--[no-]signed::
|
|
|
|
--sign=(true|false|if-asked)::
|
2015-08-19 17:26:41 +02:00
|
|
|
GPG-sign the push request to update refs on the receiving
|
|
|
|
side, to allow it to be checked by the hooks and/or be
|
2015-08-19 17:26:46 +02:00
|
|
|
logged. If `false` or `--no-signed`, no signing will be
|
|
|
|
attempted. If `true` or `--signed`, the push will fail if the
|
|
|
|
server does not support signed pushes. If set to `if-asked`,
|
|
|
|
sign if and only if the server supports signed pushes. The push
|
|
|
|
will also fail if the actual call to `gpg --sign` fails. See
|
|
|
|
linkgit:git-receive-pack[1] for the details on the receiving end.
|
2015-08-19 17:26:41 +02:00
|
|
|
|
2017-03-22 23:22:00 +01:00
|
|
|
--push-option=<string>::
|
|
|
|
Pass the specified string as a push option for consumption by
|
|
|
|
hooks on the server side. If the server doesn't support push
|
|
|
|
options, error out. See linkgit:git-push[1] and
|
|
|
|
linkgit:githooks[5] for details.
|
|
|
|
|
2005-07-14 09:10:05 +02:00
|
|
|
<host>::
|
|
|
|
A remote host to house the repository. When this
|
2008-07-03 07:41:41 +02:00
|
|
|
part is specified, 'git-receive-pack' is invoked via
|
2005-07-14 09:10:05 +02:00
|
|
|
ssh.
|
|
|
|
|
|
|
|
<directory>::
|
|
|
|
The repository to update.
|
|
|
|
|
2006-10-12 18:26:34 +02:00
|
|
|
<ref>...::
|
2005-08-04 02:15:44 +02:00
|
|
|
The remote refs to update.
|
|
|
|
|
|
|
|
|
|
|
|
Specifying the Refs
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
There are three ways to specify which refs to update on the
|
|
|
|
remote end.
|
|
|
|
|
2016-06-28 13:40:11 +02:00
|
|
|
With `--all` flag, all refs that exist locally are transferred to
|
2005-08-25 01:23:08 +02:00
|
|
|
the remote side. You cannot specify any '<ref>' if you use
|
2005-08-04 02:15:44 +02:00
|
|
|
this flag.
|
|
|
|
|
2016-06-28 13:40:11 +02:00
|
|
|
Without `--all` and without any '<ref>', the heads that exist
|
2005-08-04 02:15:44 +02:00
|
|
|
both on the local side and on the remote side are updated.
|
|
|
|
|
2014-08-21 14:21:20 +02:00
|
|
|
When one or more '<ref>' are specified explicitly (whether on the
|
|
|
|
command line or via `--stdin`), it can be either a
|
2005-08-04 02:15:44 +02:00
|
|
|
single pattern, or a pair of such pattern separated by a colon
|
2005-10-03 19:16:30 +02:00
|
|
|
":" (this means that a ref name cannot have a colon in it). A
|
2005-08-04 02:15:44 +02:00
|
|
|
single pattern '<name>' is just a shorthand for '<name>:<name>'.
|
2005-08-25 01:23:08 +02:00
|
|
|
|
2005-08-04 02:15:44 +02:00
|
|
|
Each pattern pair consists of the source side (before the colon)
|
2005-08-25 01:23:08 +02:00
|
|
|
and the destination side (after the colon). The ref to be
|
2005-08-04 02:15:44 +02:00
|
|
|
pushed is determined by finding a match that matches the source
|
|
|
|
side, and where it is pushed is determined by using the
|
2007-11-11 15:01:47 +01:00
|
|
|
destination side. The rules used to match a ref are the same
|
2010-01-10 00:33:00 +01:00
|
|
|
rules used by 'git rev-parse' to resolve a symbolic ref
|
2008-06-30 20:56:34 +02:00
|
|
|
name. See linkgit:git-rev-parse[1].
|
2005-08-04 02:15:44 +02:00
|
|
|
|
2005-08-25 01:23:08 +02:00
|
|
|
- It is an error if <src> does not match exactly one of the
|
|
|
|
local refs.
|
2005-08-04 02:15:44 +02:00
|
|
|
|
|
|
|
- It is an error if <dst> matches more than one remote refs.
|
|
|
|
|
|
|
|
- If <dst> does not match any remote ref, either
|
|
|
|
|
2005-10-03 19:16:30 +02:00
|
|
|
* it has to start with "refs/"; <dst> is used as the
|
2005-08-04 02:15:44 +02:00
|
|
|
destination literally in this case.
|
|
|
|
|
2005-10-03 19:16:30 +02:00
|
|
|
* <src> == <dst> and the ref that matched the <src> must not
|
2005-08-04 02:15:44 +02:00
|
|
|
exist in the set of remote refs; the ref matched <src>
|
|
|
|
locally is used as the name of the destination.
|
|
|
|
|
2016-06-28 13:40:11 +02:00
|
|
|
Without `--force`, the <src> ref is stored at the remote only if
|
2005-08-25 01:23:08 +02:00
|
|
|
<dst> does not exist, or <dst> is a proper subset (i.e. an
|
2009-10-24 10:31:32 +02:00
|
|
|
ancestor) of <src>. This check, known as "fast-forward check",
|
2005-08-25 01:23:08 +02:00
|
|
|
is performed in order to avoid accidentally overwriting the
|
|
|
|
remote ref and lose other peoples' commits from there.
|
|
|
|
|
2016-06-28 13:40:11 +02:00
|
|
|
With `--force`, the fast-forward check is disabled for all refs.
|
2005-08-25 01:23:08 +02:00
|
|
|
|
|
|
|
Optionally, a <ref> parameter can be prefixed with a plus '+' sign
|
|
|
|
to disable the fast-forward check only on that ref.
|
|
|
|
|
2005-07-14 09:10:05 +02:00
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 09:07:32 +02:00
|
|
|
Part of the linkgit:git[1] suite
|