2005-07-14 11:10:05 +04:00
|
|
|
git-send-pack(1)
|
|
|
|
================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2013-01-21 23:17:53 +04:00
|
|
|
git-send-pack - Push objects over Git protocol to another repository
|
2005-07-14 11:10:05 +04:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-07-02 06:38:26 +04:00
|
|
|
[verse]
|
2015-08-19 18:26:40 +03:00
|
|
|
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>]
|
2015-08-19 18:26:46 +03: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 21:20:45 +03:00
|
|
|
[--[no-]signed|--signed=(true|false|if-asked)]
|
2015-08-19 18:26:40 +03:00
|
|
|
[<host>:]<directory> [<ref>...]
|
2005-07-14 11:10:05 +04:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2010-01-10 02:33:00 +03:00
|
|
|
Usually you would want to use 'git push', which is a
|
2008-06-30 22:56:34 +04:00
|
|
|
higher-level wrapper of this command, instead. See linkgit:git-push[1].
|
2007-01-18 00:03:29 +03:00
|
|
|
|
2008-07-03 09:41:41 +04:00
|
|
|
Invokes 'git-receive-pack' on a possibly remote repository, and
|
2005-08-25 03:23:08 +04:00
|
|
|
updates it from the current repository, sending named refs.
|
2005-07-14 11:10:05 +04:00
|
|
|
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2008-06-08 05:36:09 +04:00
|
|
|
--receive-pack=<git-receive-pack>::
|
2008-07-03 09:41:41 +04:00
|
|
|
Path to the 'git-receive-pack' program on the remote
|
2005-07-14 11:10:05 +04: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 05:36:09 +04:00
|
|
|
--exec=<git-receive-pack>::
|
2015-05-13 08:01:38 +03:00
|
|
|
Same as --receive-pack=<git-receive-pack>.
|
2007-01-19 15:49:27 +03:00
|
|
|
|
2008-06-08 05:36:09 +04:00
|
|
|
--all::
|
2005-08-04 04:15:44 +04:00
|
|
|
Instead of explicitly specifying which refs to update,
|
2007-09-18 12:15:34 +04:00
|
|
|
update all heads that locally exist.
|
2005-08-04 04:15:44 +04:00
|
|
|
|
2014-08-21 16:21:20 +04: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 14:40:11 +03:00
|
|
|
If `--stateless-rpc` is specified together with this option then
|
2014-08-21 16:21:20 +04: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 05:36:09 +04:00
|
|
|
--dry-run::
|
2007-10-11 23:32:26 +04:00
|
|
|
Do everything except actually send the updates.
|
|
|
|
|
2008-06-08 05:36:09 +04:00
|
|
|
--force::
|
2005-08-25 03:23:08 +04: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 05:36:09 +04:00
|
|
|
--verbose::
|
2007-01-19 15:43:00 +03:00
|
|
|
Run verbosely.
|
|
|
|
|
2008-06-08 05:36:09 +04:00
|
|
|
--thin::
|
2010-02-18 12:10:28 +03: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 15:43:00 +03:00
|
|
|
|
2015-01-08 06:23:22 +03: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 18:26:46 +03: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 21:20:45 +03:00
|
|
|
--signed=(true|false|if-asked)::
|
2015-08-19 18:26:41 +03: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 18:26:46 +03: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 18:26:41 +03:00
|
|
|
|
2017-03-23 01:22:00 +03: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 11:10:05 +04:00
|
|
|
<host>::
|
|
|
|
A remote host to house the repository. When this
|
2008-07-03 09:41:41 +04:00
|
|
|
part is specified, 'git-receive-pack' is invoked via
|
2005-07-14 11:10:05 +04:00
|
|
|
ssh.
|
|
|
|
|
|
|
|
<directory>::
|
|
|
|
The repository to update.
|
|
|
|
|
2006-10-12 20:26:34 +04:00
|
|
|
<ref>...::
|
2005-08-04 04:15:44 +04: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 14:40:11 +03:00
|
|
|
With `--all` flag, all refs that exist locally are transferred to
|
2005-08-25 03:23:08 +04:00
|
|
|
the remote side. You cannot specify any '<ref>' if you use
|
2005-08-04 04:15:44 +04:00
|
|
|
this flag.
|
|
|
|
|
2016-06-28 14:40:11 +03:00
|
|
|
Without `--all` and without any '<ref>', the heads that exist
|
2005-08-04 04:15:44 +04:00
|
|
|
both on the local side and on the remote side are updated.
|
|
|
|
|
2014-08-21 16:21:20 +04: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 04:15:44 +04:00
|
|
|
single pattern, or a pair of such pattern separated by a colon
|
2005-10-03 21:16:30 +04:00
|
|
|
":" (this means that a ref name cannot have a colon in it). A
|
2005-08-04 04:15:44 +04:00
|
|
|
single pattern '<name>' is just a shorthand for '<name>:<name>'.
|
2005-08-25 03:23:08 +04:00
|
|
|
|
2005-08-04 04:15:44 +04:00
|
|
|
Each pattern pair consists of the source side (before the colon)
|
2005-08-25 03:23:08 +04:00
|
|
|
and the destination side (after the colon). The ref to be
|
2005-08-04 04:15:44 +04: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 17:01:47 +03:00
|
|
|
destination side. The rules used to match a ref are the same
|
2010-01-10 02:33:00 +03:00
|
|
|
rules used by 'git rev-parse' to resolve a symbolic ref
|
2008-06-30 22:56:34 +04:00
|
|
|
name. See linkgit:git-rev-parse[1].
|
2005-08-04 04:15:44 +04:00
|
|
|
|
2005-08-25 03:23:08 +04:00
|
|
|
- It is an error if <src> does not match exactly one of the
|
|
|
|
local refs.
|
2005-08-04 04:15:44 +04: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 21:16:30 +04:00
|
|
|
* it has to start with "refs/"; <dst> is used as the
|
2005-08-04 04:15:44 +04:00
|
|
|
destination literally in this case.
|
|
|
|
|
2005-10-03 21:16:30 +04:00
|
|
|
* <src> == <dst> and the ref that matched the <src> must not
|
2005-08-04 04:15:44 +04:00
|
|
|
exist in the set of remote refs; the ref matched <src>
|
|
|
|
locally is used as the name of the destination.
|
|
|
|
|
2016-06-28 14:40:11 +03:00
|
|
|
Without `--force`, the <src> ref is stored at the remote only if
|
2005-08-25 03:23:08 +04:00
|
|
|
<dst> does not exist, or <dst> is a proper subset (i.e. an
|
2009-10-24 12:31:32 +04:00
|
|
|
ancestor) of <src>. This check, known as "fast-forward check",
|
2005-08-25 03:23:08 +04:00
|
|
|
is performed in order to avoid accidentally overwriting the
|
|
|
|
remote ref and lose other peoples' commits from there.
|
|
|
|
|
2016-06-28 14:40:11 +03:00
|
|
|
With `--force`, the fast-forward check is disabled for all refs.
|
2005-08-25 03:23:08 +04: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 11:10:05 +04:00
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 11:07:32 +04:00
|
|
|
Part of the linkgit:git[1] suite
|