blob: 156bd35a11292e80aa26a104dd0f2aafdec08a5e [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Junio C Hamano40f2f8d2006-02-07 08:04:396<meta name="generator" content="AsciiDoc 7.0.2" />
Junio C Hamano1a4e8412005-12-27 08:17:237<style type="text/css">
8/* Debug borders */
9p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10/*
11 border: 1px solid red;
12*/
13}
14
15body {
16 margin: 1em 5% 1em 5%;
17}
18
19a { color: blue; }
20a:visited { color: fuchsia; }
21
22em {
23 font-style: italic;
24}
25
26strong {
27 font-weight: bold;
28}
29
30tt {
31 color: navy;
32}
33
34h1, h2, h3, h4, h5, h6 {
35 color: #527bbd;
36 font-family: sans-serif;
37 margin-top: 1.2em;
38 margin-bottom: 0.5em;
39 line-height: 1.3;
40}
41
42h1 {
43 border-bottom: 2px solid silver;
44}
45h2 {
46 border-bottom: 2px solid silver;
47 padding-top: 0.5em;
48}
49
50div.sectionbody {
51 font-family: serif;
52 margin-left: 0;
53}
54
55hr {
56 border: 1px solid silver;
57}
58
59p {
60 margin-top: 0.5em;
61 margin-bottom: 0.5em;
62}
63
64pre {
65 padding: 0;
66 margin: 0;
67}
68
69span#author {
70 color: #527bbd;
71 font-family: sans-serif;
72 font-weight: bold;
73 font-size: 1.2em;
74}
75span#email {
76}
77span#revision {
78 font-family: sans-serif;
79}
80
81div#footer {
82 font-family: sans-serif;
83 font-size: small;
84 border-top: 2px solid silver;
85 padding-top: 0.5em;
86 margin-top: 4.0em;
87}
88div#footer-text {
89 float: left;
90 padding-bottom: 0.5em;
91}
92div#footer-badges {
93 float: right;
94 padding-bottom: 0.5em;
95}
96
97div#preamble,
98div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
99div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
100div.admonitionblock {
101 margin-right: 10%;
102 margin-top: 1.5em;
103 margin-bottom: 1.5em;
104}
105div.admonitionblock {
106 margin-top: 2.5em;
107 margin-bottom: 2.5em;
108}
109
110div.content { /* Block element content. */
111 padding: 0;
112}
113
114/* Block element titles. */
115div.title, caption.title {
116 font-family: sans-serif;
117 font-weight: bold;
118 text-align: left;
119 margin-top: 1.0em;
120 margin-bottom: 0.5em;
121}
122div.title + * {
123 margin-top: 0;
124}
125
126td div.title:first-child {
127 margin-top: 0.0em;
128}
129div.content div.title:first-child {
130 margin-top: 0.0em;
131}
132div.content + div.title {
133 margin-top: 0.0em;
134}
135
136div.sidebarblock > div.content {
137 background: #ffffee;
138 border: 1px solid silver;
139 padding: 0.5em;
140}
141
142div.listingblock > div.content {
143 border: 1px solid silver;
144 background: #f4f4f4;
145 padding: 0.5em;
146}
147
148div.quoteblock > div.content {
149 padding-left: 2.0em;
150}
151div.quoteblock .attribution {
152 text-align: right;
153}
154
155div.admonitionblock .icon {
156 vertical-align: top;
157 font-size: 1.1em;
158 font-weight: bold;
159 text-decoration: underline;
160 color: #527bbd;
161 padding-right: 0.5em;
162}
163div.admonitionblock td.content {
164 padding-left: 0.5em;
165 border-left: 2px solid silver;
166}
167
168div.exampleblock > div.content {
169 border-left: 2px solid silver;
170 padding: 0.5em;
171}
172
173div.verseblock div.content {
174 white-space: pre;
175}
176
177div.imageblock div.content { padding-left: 0; }
178div.imageblock img { border: 1px solid silver; }
179span.image img { border-style: none; }
180
181dl {
182 margin-top: 0.8em;
183 margin-bottom: 0.8em;
184}
185dt {
186 margin-top: 0.5em;
187 margin-bottom: 0;
188 font-style: italic;
189}
190dd > *:first-child {
191 margin-top: 0;
192}
193
194ul, ol {
195 list-style-position: outside;
196}
197ol.olist2 {
198 list-style-type: lower-alpha;
199}
200
201div.tableblock > table {
202 border-color: #527bbd;
203 border-width: 3px;
204}
205thead {
206 font-family: sans-serif;
207 font-weight: bold;
208}
209tfoot {
210 font-weight: bold;
211}
212
213div.hlist {
214 margin-top: 0.8em;
215 margin-bottom: 0.8em;
216}
217td.hlist1 {
218 vertical-align: top;
219 font-style: italic;
220 padding-right: 0.8em;
221}
222td.hlist2 {
223 vertical-align: top;
224}
225
226@media print {
227 div#footer-badges { display: none; }
228}
229include::./stylesheets/xhtml11-manpage.css[]
230/* Workarounds for IE6's broken and incomplete CSS2. */
231
232div.sidebar-content {
233 background: #ffffee;
234 border: 1px solid silver;
235 padding: 0.5em;
236}
237div.sidebar-title, div.image-title {
238 font-family: sans-serif;
239 font-weight: bold;
240 margin-top: 0.0em;
241 margin-bottom: 0.5em;
242}
243
244div.listingblock div.content {
245 border: 1px solid silver;
246 background: #f4f4f4;
247 padding: 0.5em;
248}
249
250div.quoteblock-content {
251 padding-left: 2.0em;
252}
253
254div.exampleblock-content {
255 border-left: 2px solid silver;
256 padding-left: 0.5em;
257}
258</style>
259<title>git-push(1)</title>
260</head>
261<body>
262<div id="header">
263<h1>
264git-push(1) Manual Page
265</h1>
266<h2>NAME</h2>
267<div class="sectionbody">
268<p>git-push -
Junio C Hamano01078922006-03-10 00:31:47269 Update remote refs along with associated objects
Junio C Hamano1a4e8412005-12-27 08:17:23270</p>
271</div>
272</div>
273<h2>SYNOPSIS</h2>
274<div class="sectionbody">
Junio C Hamanoa9b8d242007-05-19 04:51:55275<div class="verseblock">
Junio C Hamano764a6672007-10-23 01:23:31276<div class="content"><em>git-push</em> [--all] [--dry-run] [--tags] [--receive-pack=&lt;git-receive-pack&gt;]
Junio C Hamano3cc17392007-11-12 04:27:07277 [--repo=all] [-f | --force] [-v | --verbose] [&lt;repository&gt; &lt;refspec&gt;&#8230;]</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23278</div>
279<h2>DESCRIPTION</h2>
280<div class="sectionbody">
281<p>Updates remote refs using local refs, while sending objects
282necessary to complete the given refs.</p>
Junio C Hamano40f2f8d2006-02-07 08:04:39283<p>You can make interesting things happen to a repository
Junio C Hamano1a4e8412005-12-27 08:17:23284every time you push into it, by setting up <em>hooks</em> there. See
285documentation for <a href="git-receive-pack.html">git-receive-pack(1)</a>.</p>
286</div>
287<h2>OPTIONS</h2>
288<div class="sectionbody">
289<dl>
290<dt>
291&lt;repository&gt;
292</dt>
293<dd>
294<p>
Junio C Hamano40f2f8d2006-02-07 08:04:39295 The "remote" repository that is destination of a push
296 operation. See the section <a href="#URLS">GIT URLS</a> below.
Junio C Hamano1a4e8412005-12-27 08:17:23297</p>
Junio C Hamano40f2f8d2006-02-07 08:04:39298</dd>
299<dt>
300&lt;refspec&gt;
301</dt>
302<dd>
303<p>
304 The canonical format of a &lt;refspec&gt; parameter is
305 <tt>+?&lt;src&gt;:&lt;dst&gt;</tt>; that is, an optional plus <tt>+</tt>, followed
306 by the source ref, followed by a colon <tt>:</tt>, followed by
307 the destination ref.
308</p>
Junio C Hamanoa9aee782008-04-23 16:09:20309<p>The &lt;src&gt; side represents the source branch (or arbitrary
310"SHA1 expression", such as <tt>master~4</tt> (four parents before the
311tip of <tt>master</tt> branch); see <a href="git-rev-parse.html">git-rev-parse(1)</a>) that you
312want to push. The &lt;dst&gt; side represents the destination location.</p>
Junio C Hamano40f2f8d2006-02-07 08:04:39313<p>The local ref that matches &lt;src&gt; is used
Junio C Hamanoa9aee782008-04-23 16:09:20314to fast forward the remote ref that matches &lt;dst&gt; (or, if no &lt;dst&gt; was
315specified, the same ref that &lt;src&gt; referred to locally). If
316the optional leading plus <tt>+</tt> is used, the remote ref is updated
Junio C Hamano40f2f8d2006-02-07 08:04:39317even if it does not result in a fast forward update.</p>
Junio C Hamano3f403b02006-12-13 10:14:13318<p><tt>tag &lt;tag&gt;</tt> means the same as <tt>refs/tags/&lt;tag&gt;:refs/tags/&lt;tag&gt;</tt>.</p>
Junio C Hamano6926bef2007-06-16 09:54:05319<p>A parameter &lt;ref&gt; without a colon pushes the &lt;ref&gt; from the source
320repository to the destination repository under the same name.</p>
Junio C Hamano3f403b02006-12-13 10:14:13321<p>Pushing an empty &lt;src&gt; allows you to delete the &lt;dst&gt; ref from
322the remote repository.</p>
Junio C Hamanob713ff12008-05-24 01:12:30323<p>The special refspec <tt>:</tt> (or <tt>+:</tt> to allow non-fast forward updates)
324directs git to push "matching" heads: for every head that exists on
325the local side, the remote side is updated if a head of the same name
326already exists on the remote side. This is the default operation mode
327if no explicit refspec is found (that is neither on the command line
328nor in any Push line of the corresponding remotes file---see below).</p>
Junio C Hamano40f2f8d2006-02-07 08:04:39329</dd>
330<dt>
331--all
332</dt>
333<dd>
334<p>
335 Instead of naming each ref to push, specifies that all
Junio C Hamanod2d9ae12007-09-19 02:27:57336 refs under <tt>$GIT_DIR/refs/heads/</tt> be pushed.
Junio C Hamano40f2f8d2006-02-07 08:04:39337</p>
338</dd>
339<dt>
Junio C Hamano9d2bbb72007-11-25 04:56:07340--mirror
341</dt>
342<dd>
343<p>
344 Instead of naming each ref to push, specifies that all
345 refs under <tt>$GIT_DIR/refs/heads/</tt> and <tt>$GIT_DIR/refs/tags/</tt>
346 be mirrored to the remote repository. Newly created local
347 refs will be pushed to the remote end, locally updated refs
348 will be force updated on the remote end, and deleted refs
Junio C Hamano47d68a52008-05-06 06:35:40349 will be removed from the remote end. This is the default
350 if the configuration option <tt>remote.&lt;remote&gt;.mirror</tt> is
351 set.
Junio C Hamano9d2bbb72007-11-25 04:56:07352</p>
353</dd>
354<dt>
Junio C Hamano764a6672007-10-23 01:23:31355--dry-run
356</dt>
357<dd>
358<p>
359 Do everything except actually send the updates.
360</p>
361</dd>
362<dt>
Junio C Hamano40f2f8d2006-02-07 08:04:39363--tags
364</dt>
365<dd>
366<p>
367 All refs under <tt>$GIT_DIR/refs/tags</tt> are pushed, in
368 addition to refspecs explicitly listed on the command
369 line.
370</p>
371</dd>
372<dt>
Junio C Hamano4ad294b2007-01-20 02:22:50373--receive-pack=&lt;git-receive-pack&gt;
Junio C Hamano1ce39ab2007-01-16 22:05:10374</dt>
375<dd>
376<p>
377 Path to the <em>git-receive-pack</em> program on the remote
378 end. Sometimes useful when pushing to a remote
379 repository over ssh, and you do not have the program in
380 a directory on the default $PATH.
381</p>
382</dd>
383<dt>
Junio C Hamano4ad294b2007-01-20 02:22:50384--exec=&lt;git-receive-pack&gt;
385</dt>
386<dd>
387<p>
388 Same as --receive-pack=&lt;git-receive-pack&gt;.
389</p>
390</dd>
391<dt>
Junio C Hamanoeb415992008-06-08 22:49:47392-f
393</dt>
394<dt>
395--force
Junio C Hamano40f2f8d2006-02-07 08:04:39396</dt>
397<dd>
398<p>
399 Usually, the command refuses to update a remote ref that is
Junio C Hamano4cd1c0e2007-08-06 04:39:14400 not an ancestor of the local ref used to overwrite it.
Junio C Hamano40f2f8d2006-02-07 08:04:39401 This flag disables the check. This can cause the
402 remote repository to lose commits; use it with care.
403</p>
404</dd>
Junio C Hamano1ce39ab2007-01-16 22:05:10405<dt>
406--repo=&lt;repo&gt;
407</dt>
408<dd>
409<p>
410 When no repository is specified the command defaults to
411 "origin"; this overrides it.
412</p>
413</dd>
414<dt>
Junio C Hamanoeb415992008-06-08 22:49:47415--thin
416</dt>
417<dt>
418--no-thin
Junio C Hamano1ce39ab2007-01-16 22:05:10419</dt>
420<dd>
421<p>
422 These options are passed to <tt>git-send-pack</tt>. Thin
423 transfer spends extra cycles to minimize the number of
424 objects to be sent and meant to be used on slower connection.
425</p>
426</dd>
427<dt>
Junio C Hamanoeb415992008-06-08 22:49:47428-v
429</dt>
430<dt>
431--verbose
Junio C Hamano1ce39ab2007-01-16 22:05:10432</dt>
433<dd>
434<p>
435 Run verbosely.
436</p>
437</dd>
Junio C Hamano40f2f8d2006-02-07 08:04:39438</dl>
439</div>
440<h2>GIT URLS<a id="URLS"></a></h2>
441<div class="sectionbody">
442<p>One of the following notations can be used
443to name the remote repository:</p>
Junio C Hamano1a4e8412005-12-27 08:17:23444<div class="exampleblock">
445<div class="exampleblock-content">
446<ul>
447<li>
448<p>
449rsync://host.xz/path/to/repo.git/
450</p>
451</li>
452<li>
453<p>
454http://host.xz/path/to/repo.git/
455</p>
456</li>
457<li>
458<p>
459https://host.xz/path/to/repo.git/
460</p>
461</li>
462<li>
463<p>
464git://host.xz/path/to/repo.git/
465</p>
466</li>
467<li>
468<p>
469git://host.xz/~user/path/to/repo.git/
470</p>
471</li>
472<li>
473<p>
Junio C Hamanodbb64592007-09-01 11:17:39474ssh://&#91;user@&#93;host.xz&#91;:port&#93;/path/to/repo.git/
475</p>
476</li>
477<li>
478<p>
Junio C Hamano7ccb9fd2006-07-15 01:38:40479ssh://&#91;user@&#93;host.xz/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:23480</p>
481</li>
482<li>
483<p>
Junio C Hamano7ccb9fd2006-07-15 01:38:40484ssh://&#91;user@&#93;host.xz/~user/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:23485</p>
486</li>
487<li>
488<p>
Junio C Hamano7ccb9fd2006-07-15 01:38:40489ssh://&#91;user@&#93;host.xz/~/path/to/repo.git
Junio C Hamano1a4e8412005-12-27 08:17:23490</p>
491</li>
492</ul>
493</div></div>
Junio C Hamanob1d6e882007-08-11 08:30:16494<p>SSH is the default transport protocol over the network. You can
495optionally specify which user to log-in as, and an alternate,
496scp-like syntax is also supported. Both syntaxes support
Junio C Hamanodbb64592007-09-01 11:17:39497username expansion, as does the native git protocol, but
498only the former supports port specification. The following
Junio C Hamanob1d6e882007-08-11 08:30:16499three are identical to the last three above, respectively:</p>
Junio C Hamano1a4e8412005-12-27 08:17:23500<div class="exampleblock">
501<div class="exampleblock-content">
502<ul>
503<li>
504<p>
Junio C Hamano7ccb9fd2006-07-15 01:38:40505&#91;user@&#93;host.xz:/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:23506</p>
507</li>
508<li>
509<p>
Junio C Hamano7ccb9fd2006-07-15 01:38:40510&#91;user@&#93;host.xz:~user/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:23511</p>
512</li>
513<li>
514<p>
Junio C Hamano7ccb9fd2006-07-15 01:38:40515&#91;user@&#93;host.xz:path/to/repo.git
Junio C Hamano1a4e8412005-12-27 08:17:23516</p>
517</li>
518</ul>
519</div></div>
Junio C Hamanob1d6e882007-08-11 08:30:16520<p>To sync with a local directory, you can use:</p>
Junio C Hamano1a4e8412005-12-27 08:17:23521<div class="exampleblock">
522<div class="exampleblock-content">
523<ul>
524<li>
525<p>
526/path/to/repo.git/
527</p>
528</li>
Junio C Hamanob1d6e882007-08-11 08:30:16529<li>
530<p>
531file:///path/to/repo.git/
532</p>
533</li>
Junio C Hamano1a4e8412005-12-27 08:17:23534</ul>
535</div></div>
Junio C Hamanob1d6e882007-08-11 08:30:16536<p>They are mostly equivalent, except when cloning. See
537<a href="git-clone.html">git-clone(1)</a> for details.</p>
Junio C Hamano24bc09a2008-02-28 00:27:44538<p>If there are a large number of similarly-named remote repositories and
539you want to use a different format for them (such that the URLs you
540use will be rewritten into URLs that work), you can create a
541configuration section of the form:</p>
542<div class="listingblock">
543<div class="content">
544<pre><tt> [url "&lt;actual url base&gt;"]
545 insteadOf = &lt;other url base&gt;</tt></pre>
546</div></div>
547<p>For example, with this:</p>
548<div class="listingblock">
549<div class="content">
550<pre><tt> [url "git://git.host.xz/"]
551 insteadOf = host.xz:/path/to/
552 insteadOf = work:</tt></pre>
553</div></div>
554<p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
555rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p>
Junio C Hamano40f2f8d2006-02-07 08:04:39556</div>
Junio C Hamano054ea082008-06-01 08:26:34557<h2>REMOTES<a id="REMOTES"></a></h2>
Junio C Hamano40f2f8d2006-02-07 08:04:39558<div class="sectionbody">
Junio C Hamano054ea082008-06-01 08:26:34559<p>The name of one of the following can be used instead
560of a URL as <tt>&lt;repository&gt;</tt> argument:</p>
561<ul>
562<li>
563<p>
564a remote in the git configuration file: <tt>$GIT_DIR/config</tt>,
565</p>
566</li>
567<li>
568<p>
569a file in the <tt>$GIT_DIR/remotes</tt> directory, or
570</p>
571</li>
572<li>
573<p>
574a file in the <tt>$GIT_DIR/branches</tt> directory.
575</p>
576</li>
577</ul>
578<p>All of these also allow you to omit the refspec from the command line
579because they each contain a refspec which git will use by default.</p>
580<h3>Named remote in configuration file</h3>
581<p>You can choose to provide the name of a remote which you had previously
582configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a>
583or even by a manual edit to the <tt>$GIT_DIR/config</tt> file. The URL of
584this remote will be used to access the repository. The refspec
585of this remote will be used by default when you do
586not provide a refspec on the command line. The entry in the
587config file would appear like this:</p>
588<div class="listingblock">
589<div class="content">
590<pre><tt> [remote "&lt;name&gt;"]
591 url = &lt;url&gt;
592 push = &lt;refspec&gt;
593 fetch = &lt;refspec&gt;</tt></pre>
594</div></div>
595<h3>Named file in <tt>$GIT_DIR/remotes</tt></h3>
596<p>You can choose to provide the name of a
597file in <tt>$GIT_DIR/remotes</tt>. The URL
598in this file will be used to access the repository. The refspec
599in this file will be used as default when you do not
600provide a refspec on the command line. This file should have the
601following format:</p>
Junio C Hamano1caaf472006-12-31 08:29:35602<div class="listingblock">
Junio C Hamano1a4e8412005-12-27 08:17:23603<div class="content">
Junio C Hamanod3361ad2007-01-01 03:20:24604<pre><tt> URL: one of the above URL format
605 Push: &lt;refspec&gt;
606 Pull: &lt;refspec&gt;
607</tt></pre>
Junio C Hamano1a4e8412005-12-27 08:17:23608</div></div>
Junio C Hamano054ea082008-06-01 08:26:34609<p><tt>Push:</tt> lines are used by <tt>git-push</tt> and
610<tt>Pull:</tt> lines are used by <tt>git-pull</tt> and <tt>git-fetch</tt>.
611Multiple <tt>Push:</tt> and <tt>Pull:</tt> lines may
Junio C Hamano1a4e8412005-12-27 08:17:23612be specified for additional branch mappings.</p>
Junio C Hamano054ea082008-06-01 08:26:34613<h3>Named file in <tt>$GIT_DIR/branches</tt></h3>
614<p>You can choose to provide the name of a
615file in <tt>$GIT_DIR/branches</tt>.
616The URL in this file will be used to access the repository.
617This file should have the following format:</p>
Junio C Hamano1caaf472006-12-31 08:29:35618<div class="listingblock">
Junio C Hamano249572f2006-10-24 05:44:08619<div class="content">
Junio C Hamano054ea082008-06-01 08:26:34620<pre><tt> &lt;url&gt;#&lt;head&gt;</tt></pre>
Junio C Hamano249572f2006-10-24 05:44:08621</div></div>
Junio C Hamano054ea082008-06-01 08:26:34622<p><tt>&lt;url&gt;</tt> is required; <tt>#&lt;head&gt;</tt> is optional.
623When you do not provide a refspec on the command line,
624git will use the following refspec, where <tt>&lt;head&gt;</tt> defaults to <tt>master</tt>,
625and <tt>&lt;repository&gt;</tt> is the name of this file
626you provided in the command line.</p>
Junio C Hamano1caaf472006-12-31 08:29:35627<div class="listingblock">
Junio C Hamano1a4e8412005-12-27 08:17:23628<div class="content">
Junio C Hamano054ea082008-06-01 08:26:34629<pre><tt> refs/heads/&lt;head&gt;:&lt;repository&gt;</tt></pre>
Junio C Hamano1a4e8412005-12-27 08:17:23630</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23631</div>
Junio C Hamano6d559fc2008-02-20 10:44:26632<h2>OUTPUT</h2>
633<div class="sectionbody">
634<p>The output of "git push" depends on the transport method used; this
635section describes the output when pushing over the git protocol (either
636locally or via ssh).</p>
637<p>The status of the push is output in tabular form, with each line
638representing the status of a single ref. Each line is of the form:</p>
639<div class="listingblock">
640<div class="content">
641<pre><tt> &lt;flag&gt; &lt;summary&gt; &lt;from&gt; -&gt; &lt;to&gt; (&lt;reason&gt;)</tt></pre>
642</div></div>
643<dl>
644<dt>
645flag
646</dt>
647<dd>
648<p>
649 A single character indicating the status of the ref. This is
650 blank for a successfully pushed ref, <tt>!</tt> for a ref that was
651 rejected or failed to push, and <em>=</em> for a ref that was up to
652 date and did not need pushing (note that the status of up to
653 date refs is shown only when <tt>git push</tt> is running verbosely).
654</p>
655</dd>
656<dt>
657summary
658</dt>
659<dd>
660<p>
661 For a successfully pushed ref, the summary shows the old and new
662 values of the ref in a form suitable for using as an argument to
663 <tt>git log</tt> (this is <tt>&lt;old&gt;..&lt;new&gt;</tt> in most cases, and
664 <tt>&lt;old&gt;&#8230;&lt;new&gt;</tt> for forced non-fast forward updates). For a
665 failed update, more details are given for the failure.
666 The string <tt>rejected</tt> indicates that git did not try to send the
667 ref at all (typically because it is not a fast forward). The
668 string <tt>remote rejected</tt> indicates that the remote end refused
669 the update; this rejection is typically caused by a hook on the
670 remote side. The string <tt>remote failure</tt> indicates that the
671 remote end did not report the successful update of the ref
672 (perhaps because of a temporary error on the remote side, a
673 break in the network connection, or other transient error).
674</p>
675</dd>
676<dt>
677from
678</dt>
679<dd>
680<p>
681 The name of the local ref being pushed, minus its
682 <tt>refs/&lt;type&gt;/</tt> prefix. In the case of deletion, the
683 name of the local ref is omitted.
684</p>
685</dd>
686<dt>
687to
688</dt>
689<dd>
690<p>
691 The name of the remote ref being updated, minus its
692 <tt>refs/&lt;type&gt;/</tt> prefix.
693</p>
694</dd>
695<dt>
696reason
697</dt>
698<dd>
699<p>
700 A human-readable explanation. In the case of successfully pushed
701 refs, no explanation is needed. For a failed ref, the reason for
702 failure is described.
703</p>
704</dd>
705</dl>
706</div>
Junio C Hamano6926bef2007-06-16 09:54:05707<h2>Examples</h2>
708<div class="sectionbody">
709<dl>
710<dt>
711git push origin master
712</dt>
713<dd>
714<p>
715 Find a ref that matches <tt>master</tt> in the source repository
716 (most likely, it would find <tt>refs/heads/master</tt>), and update
717 the same ref (e.g. <tt>refs/heads/master</tt>) in <tt>origin</tt> repository
Junio C Hamanoa9aee782008-04-23 16:09:20718 with it. If <tt>master</tt> did not exist remotely, it would be
719 created.
Junio C Hamano6926bef2007-06-16 09:54:05720</p>
721</dd>
722<dt>
723git push origin :experimental
724</dt>
725<dd>
726<p>
727 Find a ref that matches <tt>experimental</tt> in the <tt>origin</tt> repository
728 (e.g. <tt>refs/heads/experimental</tt>), and delete it.
729</p>
730</dd>
731<dt>
732git push origin master:satellite/master
733</dt>
734<dd>
735<p>
736 Find a ref that matches <tt>master</tt> in the source repository
737 (most likely, it would find <tt>refs/heads/master</tt>), and update
738 the ref that matches <tt>satellite/master</tt> (most likely, it would
739 be <tt>refs/remotes/satellite/master</tt>) in <tt>origin</tt> repository with it.
740</p>
741</dd>
Junio C Hamanobfd4f9a2007-09-06 08:52:44742<dt>
743git push origin master:refs/heads/experimental
744</dt>
745<dd>
746<p>
747 Create the branch <tt>experimental</tt> in the <tt>origin</tt> repository
Junio C Hamanoa9aee782008-04-23 16:09:20748 by copying the current <tt>master</tt> branch. This form is only
749 needed to create a new branch or tag in the remote repository when
750 the local name and the remote name are different; otherwise,
751 the ref name on its own will work.
Junio C Hamanobfd4f9a2007-09-06 08:52:44752</p>
753</dd>
Junio C Hamano6926bef2007-06-16 09:54:05754</dl>
755</div>
Junio C Hamano1a4e8412005-12-27 08:17:23756<h2>Author</h2>
757<div class="sectionbody">
Junio C Hamano3f403b02006-12-13 10:14:13758<p>Written by Junio C Hamano &lt;junkio@cox.net&gt;, later rewritten in C
759by Linus Torvalds &lt;torvalds@osdl.org&gt;</p>
Junio C Hamano1a4e8412005-12-27 08:17:23760</div>
761<h2>Documentation</h2>
762<div class="sectionbody">
763<p>Documentation by Junio C Hamano and the git-list &lt;git@vger.kernel.org&gt;.</p>
764</div>
765<h2>GIT</h2>
766<div class="sectionbody">
Junio C Hamanof7c042d2008-06-06 22:50:53767<p>Part of the <a href="git.html">git(1)</a> suite</p>
Junio C Hamano1a4e8412005-12-27 08:17:23768</div>
769<div id="footer">
770<div id="footer-text">
Junio C Hamanoeb415992008-06-08 22:49:47771Last updated 08-Jun-2008 22:46:55 UTC
Junio C Hamano1a4e8412005-12-27 08:17:23772</div>
773</div>
774</body>
775</html>