2005-07-14 07:10:05 +00:00
|
|
|
git-send-pack(1)
|
|
|
|
================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2013-01-21 19:17:53 +00:00
|
|
|
git-send-pack - Push objects over Git protocol to another repository
|
2005-07-14 07:10:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-07-02 02:38:26 +00:00
|
|
|
[verse]
|
2015-08-19 15:26:40 +00:00
|
|
|
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
|
2015-08-19 15:26:46 +00:00
|
|
|
[--verbose] [--thin] [--atomic]
|
Doc/git-{push,send-pack}: correct --sign= to --signed=
Since we're about to touch the behavior of --signed=, do this as a
preparatory step.
The documentation mentions --sign=, and it works. But that's just
because it's an unambiguous abbreviation of --signed, which is how it is
actually implemented. This was added in commit 30261094 ("push: support
signing pushes iff the server supports it", 2015-08-19). Back when that
series was developed [1] [2], there were suggestions about both --sign=
and --signed=. The final implementation settled on --signed=, but some
of the documentation and commit messages ended up using --sign=.
The option is referred to as --signed= in Documentation/config.txt
(under push.gpgSign).
One could argue that we have promised --sign for two years now, so we
should implement it as an alias for --signed. (Then we might also
deprecate the latter, something which was considered already then.) That
would be a slightly more intrusive change.
This minor issue would only be a problem once we want to implement some
other option --signfoo, but the earlier we do this step, the better.
[1] v1-thread:
https://public-inbox.org/git/1439492451-11233-1-git-send-email-dborowitz@google.com/T/#u
[2] v2-thread:
https://public-inbox.org/git/1439998007-28719-1-git-send-email-dborowitz@google.com/T/#m6533a6c4707a30b0d81e86169ff8559460cbf6eb
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-07 18:20:45 +00:00
|
|
|
[--[no-]signed|--signed=(true|false|if-asked)]
|
2015-08-19 15:26:40 +00:00
|
|
|
[<host>:]<directory> [<ref>...]
|
2005-07-14 07:10:05 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2010-01-09 23:33:00 +00:00
|
|
|
Usually you would want to use 'git push', which is a
|
2008-06-30 18:56:34 +00:00
|
|
|
higher-level wrapper of this command, instead. See linkgit:git-push[1].
|
2007-01-17 21:03:29 +00:00
|
|
|
|
2008-07-03 05:41:41 +00:00
|
|
|
Invokes 'git-receive-pack' on a possibly remote repository, and
|
2005-08-24 23:23:08 +00:00
|
|
|
updates it from the current repository, sending named refs.
|
2005-07-14 07:10:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2008-06-08 01:36:09 +00:00
|
|
|
--receive-pack=<git-receive-pack>::
|
2008-07-03 05:41:41 +00:00
|
|
|
Path to the 'git-receive-pack' program on the remote
|
2005-07-14 07:10:05 +00: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 01:36:09 +00:00
|
|
|
--exec=<git-receive-pack>::
|
2015-05-13 05:01:38 +00:00
|
|
|
Same as --receive-pack=<git-receive-pack>.
|
2007-01-19 12:49:27 +00:00
|
|
|
|
2008-06-08 01:36:09 +00:00
|
|
|
--all::
|
2005-08-04 00:15:44 +00:00
|
|
|
Instead of explicitly specifying which refs to update,
|
2007-09-18 08:15:34 +00:00
|
|
|
update all heads that locally exist.
|
2005-08-04 00:15:44 +00:00
|
|
|
|
2014-08-21 12:21:20 +00: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 11:40:11 +00:00
|
|
|
If `--stateless-rpc` is specified together with this option then
|
2014-08-21 12:21:20 +00: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 01:36:09 +00:00
|
|
|
--dry-run::
|
2007-10-11 19:32:26 +00:00
|
|
|
Do everything except actually send the updates.
|
|
|
|
|
2008-06-08 01:36:09 +00:00
|
|
|
--force::
|
2005-08-24 23:23:08 +00: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 01:36:09 +00:00
|
|
|
--verbose::
|
2007-01-19 12:43:00 +00:00
|
|
|
Run verbosely.
|
|
|
|
|
2008-06-08 01:36:09 +00:00
|
|
|
--thin::
|
2010-02-18 09:10:28 +00: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 12:43:00 +00:00
|
|
|
|
2015-01-08 03:23:22 +00: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 15:26:46 +00:00
|
|
|
--[no-]signed::
|
Doc/git-{push,send-pack}: correct --sign= to --signed=
Since we're about to touch the behavior of --signed=, do this as a
preparatory step.
The documentation mentions --sign=, and it works. But that's just
because it's an unambiguous abbreviation of --signed, which is how it is
actually implemented. This was added in commit 30261094 ("push: support
signing pushes iff the server supports it", 2015-08-19). Back when that
series was developed [1] [2], there were suggestions about both --sign=
and --signed=. The final implementation settled on --signed=, but some
of the documentation and commit messages ended up using --sign=.
The option is referred to as --signed= in Documentation/config.txt
(under push.gpgSign).
One could argue that we have promised --sign for two years now, so we
should implement it as an alias for --signed. (Then we might also
deprecate the latter, something which was considered already then.) That
would be a slightly more intrusive change.
This minor issue would only be a problem once we want to implement some
other option --signfoo, but the earlier we do this step, the better.
[1] v1-thread:
https://public-inbox.org/git/1439492451-11233-1-git-send-email-dborowitz@google.com/T/#u
[2] v2-thread:
https://public-inbox.org/git/1439998007-28719-1-git-send-email-dborowitz@google.com/T/#m6533a6c4707a30b0d81e86169ff8559460cbf6eb
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-08-07 18:20:45 +00:00
|
|
|
--signed=(true|false|if-asked)::
|
2015-08-19 15:26:41 +00: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 15:26:46 +00: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 15:26:41 +00:00
|
|
|
|
2017-03-22 22:22:00 +00: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 07:10:05 +00:00
|
|
|
<host>::
|
|
|
|
A remote host to house the repository. When this
|
2008-07-03 05:41:41 +00:00
|
|
|
part is specified, 'git-receive-pack' is invoked via
|
2005-07-14 07:10:05 +00:00
|
|
|
ssh.
|
|
|
|
|
|
|
|
<directory>::
|
|
|
|
The repository to update.
|
|
|
|
|
2006-10-12 16:26:34 +00:00
|
|
|
<ref>...::
|
2005-08-04 00:15:44 +00:00
|
|
|
The remote refs to update.
|
|
|
|
|
|
|
|
|
2018-04-30 15:35:33 +00:00
|
|
|
SPECIFYING THE REFS
|
2005-08-04 00:15:44 +00:00
|
|
|
-------------------
|
|
|
|
|
|
|
|
There are three ways to specify which refs to update on the
|
|
|
|
remote end.
|
|
|
|
|
2016-06-28 11:40:11 +00:00
|
|
|
With `--all` flag, all refs that exist locally are transferred to
|
2005-08-24 23:23:08 +00:00
|
|
|
the remote side. You cannot specify any '<ref>' if you use
|
2005-08-04 00:15:44 +00:00
|
|
|
this flag.
|
|
|
|
|
2016-06-28 11:40:11 +00:00
|
|
|
Without `--all` and without any '<ref>', the heads that exist
|
2005-08-04 00:15:44 +00:00
|
|
|
both on the local side and on the remote side are updated.
|
|
|
|
|
2014-08-21 12:21:20 +00: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 00:15:44 +00:00
|
|
|
single pattern, or a pair of such pattern separated by a colon
|
2005-10-03 17:16:30 +00:00
|
|
|
":" (this means that a ref name cannot have a colon in it). A
|
2005-08-04 00:15:44 +00:00
|
|
|
single pattern '<name>' is just a shorthand for '<name>:<name>'.
|
2005-08-24 23:23:08 +00:00
|
|
|
|
2005-08-04 00:15:44 +00:00
|
|
|
Each pattern pair consists of the source side (before the colon)
|
2005-08-24 23:23:08 +00:00
|
|
|
and the destination side (after the colon). The ref to be
|
2005-08-04 00:15:44 +00: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 14:01:47 +00:00
|
|
|
destination side. The rules used to match a ref are the same
|
2010-01-09 23:33:00 +00:00
|
|
|
rules used by 'git rev-parse' to resolve a symbolic ref
|
2008-06-30 18:56:34 +00:00
|
|
|
name. See linkgit:git-rev-parse[1].
|
2005-08-04 00:15:44 +00:00
|
|
|
|
2005-08-24 23:23:08 +00:00
|
|
|
- It is an error if <src> does not match exactly one of the
|
|
|
|
local refs.
|
2005-08-04 00:15:44 +00: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 17:16:30 +00:00
|
|
|
* it has to start with "refs/"; <dst> is used as the
|
2005-08-04 00:15:44 +00:00
|
|
|
destination literally in this case.
|
|
|
|
|
2005-10-03 17:16:30 +00:00
|
|
|
* <src> == <dst> and the ref that matched the <src> must not
|
2005-08-04 00:15:44 +00:00
|
|
|
exist in the set of remote refs; the ref matched <src>
|
|
|
|
locally is used as the name of the destination.
|
|
|
|
|
2016-06-28 11:40:11 +00:00
|
|
|
Without `--force`, the <src> ref is stored at the remote only if
|
2005-08-24 23:23:08 +00:00
|
|
|
<dst> does not exist, or <dst> is a proper subset (i.e. an
|
2009-10-24 08:31:32 +00:00
|
|
|
ancestor) of <src>. This check, known as "fast-forward check",
|
2005-08-24 23:23:08 +00:00
|
|
|
is performed in order to avoid accidentally overwriting the
|
|
|
|
remote ref and lose other peoples' commits from there.
|
|
|
|
|
2016-06-28 11:40:11 +00:00
|
|
|
With `--force`, the fast-forward check is disabled for all refs.
|
2005-08-24 23:23:08 +00: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 07:10:05 +00:00
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 07:07:32 +00:00
|
|
|
Part of the linkgit:git[1] suite
|