Updated git_doc to git 1.8
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-send-pack.xml
blob3ba672a85eac6aeb69543a2bfcee84eb1237ca5d
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <sect2 lang="en" id="git-send-pack(1)">\r
5     <title>git-send-pack(1)</title>\r
6 <indexterm>\r
7 <primary>git-send-pack(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-send-pack(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-send-pack - Push objects over git protocol to another repository</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-send-pack(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git send-pack</emphasis> [--all] [--dry-run] [--force] [--receive-pack=&lt;git-receive-pack&gt;] [--verbose] [--thin] [&lt;host&gt;:]&lt;directory&gt; [&lt;ref&gt;&#8230;]</literallayout>\r
17 </blockquote>\r
18 </simplesect>\r
19 <simplesect id="git-send-pack(1)__description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Usually you would want to use <emphasis>git push</emphasis>, which is a\r
22 higher-level wrapper of this command, instead. See <xref linkend="git-push(1)" />.</simpara>\r
23 <simpara>Invokes <emphasis>git-receive-pack</emphasis> on a possibly remote repository, and\r
24 updates it from the current repository, sending named refs.</simpara>\r
25 </simplesect>\r
26 <simplesect id="git-send-pack(1)__options">\r
27 <title>OPTIONS</title>\r
28 <variablelist>\r
29 <varlistentry>\r
30 <term>\r
31 --receive-pack=&lt;git-receive-pack&gt;\r
32 </term>\r
33 <listitem>\r
34 <simpara>\r
35         Path to the <emphasis>git-receive-pack</emphasis> program on the remote\r
36         end.  Sometimes useful when pushing to a remote\r
37         repository over ssh, and you do not have the program in\r
38         a directory on the default $PATH.\r
39 </simpara>\r
40 </listitem>\r
41 </varlistentry>\r
42 <varlistentry>\r
43 <term>\r
44 --exec=&lt;git-receive-pack&gt;\r
45 </term>\r
46 <listitem>\r
47 <simpara>\r
48         Same as --receive-pack=&lt;git-receive-pack&gt;.\r
49 </simpara>\r
50 </listitem>\r
51 </varlistentry>\r
52 <varlistentry>\r
53 <term>\r
54 --all\r
55 </term>\r
56 <listitem>\r
57 <simpara>\r
58         Instead of explicitly specifying which refs to update,\r
59         update all heads that locally exist.\r
60 </simpara>\r
61 </listitem>\r
62 </varlistentry>\r
63 <varlistentry>\r
64 <term>\r
65 --dry-run\r
66 </term>\r
67 <listitem>\r
68 <simpara>\r
69         Do everything except actually send the updates.\r
70 </simpara>\r
71 </listitem>\r
72 </varlistentry>\r
73 <varlistentry>\r
74 <term>\r
75 --force\r
76 </term>\r
77 <listitem>\r
78 <simpara>\r
79         Usually, the command refuses to update a remote ref that\r
80         is not an ancestor of the local ref used to overwrite it.\r
81         This flag disables the check.  What this means is that\r
82         the remote repository can lose commits; use it with\r
83         care.\r
84 </simpara>\r
85 </listitem>\r
86 </varlistentry>\r
87 <varlistentry>\r
88 <term>\r
89 --verbose\r
90 </term>\r
91 <listitem>\r
92 <simpara>\r
93         Run verbosely.\r
94 </simpara>\r
95 </listitem>\r
96 </varlistentry>\r
97 <varlistentry>\r
98 <term>\r
99 --thin\r
100 </term>\r
101 <listitem>\r
102 <simpara>\r
103         Send a "thin" pack, which records objects in deltified form based\r
104         on objects not included in the pack to reduce network traffic.\r
105 </simpara>\r
106 </listitem>\r
107 </varlistentry>\r
108 <varlistentry>\r
109 <term>\r
110 &lt;host&gt;\r
111 </term>\r
112 <listitem>\r
113 <simpara>\r
114         A remote host to house the repository.  When this\r
115         part is specified, <emphasis>git-receive-pack</emphasis> is invoked via\r
116         ssh.\r
117 </simpara>\r
118 </listitem>\r
119 </varlistentry>\r
120 <varlistentry>\r
121 <term>\r
122 &lt;directory&gt;\r
123 </term>\r
124 <listitem>\r
125 <simpara>\r
126         The repository to update.\r
127 </simpara>\r
128 </listitem>\r
129 </varlistentry>\r
130 <varlistentry>\r
131 <term>\r
132 &lt;ref&gt;&#8230;\r
133 </term>\r
134 <listitem>\r
135 <simpara>\r
136         The remote refs to update.\r
137 </simpara>\r
138 </listitem>\r
139 </varlistentry>\r
140 </variablelist>\r
141 </simplesect>\r
142 <simplesect id="git-send-pack(1)__specifying_the_refs">\r
143 <title>Specifying the Refs</title>\r
144 <simpara>There are three ways to specify which refs to update on the\r
145 remote end.</simpara>\r
146 <simpara>With <emphasis>--all</emphasis> flag, all refs that exist locally are transferred to\r
147 the remote side.  You cannot specify any <emphasis>&lt;ref&gt;</emphasis> if you use\r
148 this flag.</simpara>\r
149 <simpara>Without <emphasis>--all</emphasis> and without any <emphasis>&lt;ref&gt;</emphasis>, the heads that exist\r
150 both on the local side and on the remote side are updated.</simpara>\r
151 <simpara>When one or more <emphasis>&lt;ref&gt;</emphasis> are specified explicitly, it can be either a\r
152 single pattern, or a pair of such pattern separated by a colon\r
153 ":" (this means that a ref name cannot have a colon in it).  A\r
154 single pattern <emphasis>&lt;name&gt;</emphasis> is just a shorthand for <emphasis>&lt;name&gt;:&lt;name&gt;</emphasis>.</simpara>\r
155 <simpara>Each pattern pair consists of the source side (before the colon)\r
156 and the destination side (after the colon).  The ref to be\r
157 pushed is determined by finding a match that matches the source\r
158 side, and where it is pushed is determined by using the\r
159 destination side. The rules used to match a ref are the same\r
160 rules used by <emphasis>git rev-parse</emphasis> to resolve a symbolic ref\r
161 name. See <xref linkend="git-rev-parse(1)" />.</simpara>\r
162 <itemizedlist>\r
163 <listitem>\r
164 <simpara>\r
165 It is an error if &lt;src&gt; does not match exactly one of the\r
166    local refs.\r
167 </simpara>\r
168 </listitem>\r
169 <listitem>\r
170 <simpara>\r
171 It is an error if &lt;dst&gt; matches more than one remote refs.\r
172 </simpara>\r
173 </listitem>\r
174 <listitem>\r
175 <simpara>\r
176 If &lt;dst&gt; does not match any remote ref, either\r
177 </simpara>\r
178 <itemizedlist>\r
179 <listitem>\r
180 <simpara>\r
181 it has to start with "refs/"; &lt;dst&gt; is used as the\r
182      destination literally in this case.\r
183 </simpara>\r
184 </listitem>\r
185 <listitem>\r
186 <simpara>\r
187 &lt;src&gt; == &lt;dst&gt; and the ref that matched the &lt;src&gt; must not\r
188      exist in the set of remote refs; the ref matched &lt;src&gt;\r
189      locally is used as the name of the destination.\r
190 </simpara>\r
191 </listitem>\r
192 </itemizedlist>\r
193 </listitem>\r
194 </itemizedlist>\r
195 <simpara>Without <emphasis>--force</emphasis>, the &lt;src&gt; ref is stored at the remote only if\r
196 &lt;dst&gt; does not exist, or &lt;dst&gt; is a proper subset (i.e. an\r
197 ancestor) of &lt;src&gt;.  This check, known as "fast-forward check",\r
198 is performed in order to avoid accidentally overwriting the\r
199 remote ref and lose other peoples' commits from there.</simpara>\r
200 <simpara>With <emphasis>--force</emphasis>, the fast-forward check is disabled for all refs.</simpara>\r
201 <simpara>Optionally, a &lt;ref&gt; parameter can be prefixed with a plus <emphasis>+</emphasis> sign\r
202 to disable the fast-forward check only on that ref.</simpara>\r
203 </simplesect>\r
204 <simplesect id="git-send-pack(1)__git">\r
205 <title>GIT</title>\r
206 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
207 </simplesect>\r
208 </sect2>\r