2005-07-14 09:10:05 +02:00
|
|
|
git-send-pack(1)
|
|
|
|
================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2007-02-04 05:49:16 +01:00
|
|
|
git-send-pack - Push objects over git protocol to another repository
|
2005-07-14 09:10:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2008-06-30 08:09:04 +02:00
|
|
|
'git send-pack' [--all] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [<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>::
|
2007-01-19 13:49:27 +01:00
|
|
|
Same as \--receive-pack=<git-receive-pack>.
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
|
2006-06-03 22:27:26 +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.
|
|
|
|
|
2007-09-18 10:15:34 +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.
|
|
|
|
|
2005-10-03 19:16:30 +02:00
|
|
|
When one or more '<ref>' are specified explicitly, 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.
|
|
|
|
|
2005-08-25 01:23:08 +02:00
|
|
|
Without '--force', the <src> ref is stored at the remote only if
|
|
|
|
<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.
|
|
|
|
|
2009-10-24 10:31:32 +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
|