1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
\r
6 <meta name="generator" content="AsciiDoc 7.0.2" />
\r
7 <style type="text/css">
\r
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
\r
11 border: 1px solid red;
\r
16 margin: 1em 5% 1em 5%;
\r
20 a:visited { color: fuchsia; }
\r
34 h1, h2, h3, h4, h5, h6 {
\r
36 font-family: sans-serif;
\r
38 margin-bottom: 0.5em;
\r
43 border-bottom: 2px solid silver;
\r
46 border-bottom: 2px solid silver;
\r
56 border: 1px solid silver;
\r
61 margin-bottom: 0.5em;
\r
71 font-family: sans-serif;
\r
78 font-family: sans-serif;
\r
82 font-family: sans-serif;
\r
84 border-top: 2px solid silver;
\r
90 padding-bottom: 0.5em;
\r
94 padding-bottom: 0.5em;
\r
98 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
\r
99 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
100 div.admonitionblock {
\r
103 margin-bottom: 1.5em;
\r
105 div.admonitionblock {
\r
107 margin-bottom: 2.5em;
\r
110 div.content { /* Block element content. */
\r
114 /* Block element titles. */
\r
115 div.title, caption.title {
\r
116 font-family: sans-serif;
\r
120 margin-bottom: 0.5em;
\r
126 td div.title:first-child {
\r
129 div.content div.title:first-child {
\r
132 div.content + div.title {
\r
136 div.sidebarblock > div.content {
\r
137 background: #ffffee;
\r
138 border: 1px solid silver;
\r
142 div.listingblock > div.content {
\r
143 border: 1px solid silver;
\r
144 background: #f4f4f4;
\r
148 div.quoteblock > div.content {
\r
149 padding-left: 2.0em;
\r
151 div.quoteblock .attribution {
\r
155 div.admonitionblock .icon {
\r
156 vertical-align: top;
\r
159 text-decoration: underline;
\r
161 padding-right: 0.5em;
\r
163 div.admonitionblock td.content {
\r
164 padding-left: 0.5em;
\r
165 border-left: 2px solid silver;
\r
168 div.exampleblock > div.content {
\r
169 border-left: 2px solid silver;
\r
173 div.verseblock div.content {
\r
177 div.imageblock div.content { padding-left: 0; }
\r
178 div.imageblock img { border: 1px solid silver; }
\r
179 span.image img { border-style: none; }
\r
183 margin-bottom: 0.8em;
\r
188 font-style: italic;
\r
190 dd > *:first-child {
\r
195 list-style-position: outside;
\r
198 list-style-type: lower-alpha;
\r
201 div.tableblock > table {
\r
202 border-color: #527bbd;
\r
206 font-family: sans-serif;
\r
215 margin-bottom: 0.8em;
\r
218 vertical-align: top;
\r
219 font-style: italic;
\r
220 padding-right: 0.8em;
\r
223 vertical-align: top;
\r
227 div#footer-badges { display: none; }
\r
229 include::./stylesheets/xhtml11-manpage.css[]
\r
230 /* Workarounds for IE6's broken and incomplete CSS2. */
\r
232 div.sidebar-content {
\r
233 background: #ffffee;
\r
234 border: 1px solid silver;
\r
237 div.sidebar-title, div.image-title {
\r
238 font-family: sans-serif;
\r
241 margin-bottom: 0.5em;
\r
244 div.listingblock div.content {
\r
245 border: 1px solid silver;
\r
246 background: #f4f4f4;
\r
250 div.quoteblock-content {
\r
251 padding-left: 2.0em;
\r
254 div.exampleblock-content {
\r
255 border-left: 2px solid silver;
\r
256 padding-left: 0.5em;
\r
259 <title>git-push(1)</title>
\r
264 git-push(1) Manual Page
\r
267 <div class="sectionbody">
\r
269 Update remote refs along with associated objects.
\r
274 <div class="sectionbody">
\r
275 <p><em>git-push</em> [--all] [--tags] [--force] <repository> <refspec>…</p>
\r
277 <h2>DESCRIPTION</h2>
\r
278 <div class="sectionbody">
\r
279 <p>Updates remote refs using local refs, while sending objects
\r
280 necessary to complete the given refs.</p>
\r
281 <p>You can make interesting things happen to a repository
\r
282 every time you push into it, by setting up <em>hooks</em> there. See
\r
283 documentation for <a href="git-receive-pack.html">git-receive-pack(1)</a>.</p>
\r
286 <div class="sectionbody">
\r
293 The "remote" repository that is destination of a push
\r
294 operation. See the section <a href="#URLS">GIT URLS</a> below.
\r
302 The canonical format of a <refspec> parameter is
\r
303 <tt>+?<src>:<dst></tt>; that is, an optional plus <tt>+</tt>, followed
\r
304 by the source ref, followed by a colon <tt>:</tt>, followed by
\r
305 the destination ref.
\r
307 <p>The <src> side can be an
\r
308 arbitrary "SHA1 expression" that can be used as an
\r
309 argument to <tt>git-cat-file -t</tt>. E.g. <tt>master~4</tt> (push
\r
310 four parents before the current master head).</p>
\r
311 <p>The local ref that matches <src> is used
\r
312 to fast forward the remote ref that matches <dst>. If
\r
313 the optional plus <tt>+</tt> is used, the remote ref is updated
\r
314 even if it does not result in a fast forward update.</p>
\r
315 <p>Some short-cut notations are also supported.</p>
\r
319 <tt>tag <tag></tt> means the same as <tt>refs/tags/<tag>:refs/tags/<tag></tt>.
\r
324 A parameter <ref> without a colon is equivalent to
\r
325 <ref><tt>:</tt><ref>, hence updates <ref> in the destination from <ref>
\r
336 Instead of naming each ref to push, specifies that all
\r
345 All refs under <tt>$GIT_DIR/refs/tags</tt> are pushed, in
\r
346 addition to refspecs explicitly listed on the command
\r
355 Usually, the command refuses to update a remote ref that is
\r
356 not a descendent of the local ref used to overwrite it.
\r
357 This flag disables the check. This can cause the
\r
358 remote repository to lose commits; use it with care.
\r
363 <h2>GIT URLS<a id="URLS"></a></h2>
\r
364 <div class="sectionbody">
\r
365 <p>One of the following notations can be used
\r
366 to name the remote repository:</p>
\r
367 <div class="exampleblock">
\r
368 <div class="exampleblock-content">
\r
372 rsync://host.xz/path/to/repo.git/
\r
377 http://host.xz/path/to/repo.git/
\r
382 https://host.xz/path/to/repo.git/
\r
387 git://host.xz/path/to/repo.git/
\r
392 git://host.xz/~user/path/to/repo.git/
\r
397 ssh://host.xz/path/to/repo.git/
\r
402 ssh://host.xz/~user/path/to/repo.git/
\r
407 ssh://host.xz/~/path/to/repo.git
\r
412 <p>SSH Is the default transport protocol and also supports an
\r
413 scp-like syntax. Both syntaxes support username expansion,
\r
414 as does the native git protocol. The following three are
\r
415 identical to the last three above, respectively:</p>
\r
416 <div class="exampleblock">
\r
417 <div class="exampleblock-content">
\r
421 host.xz:/path/to/repo.git/
\r
426 host.xz:~user/path/to/repo.git/
\r
431 host.xz:path/to/repo.git
\r
436 <p>To sync with a local directory, use:</p>
\r
437 <div class="exampleblock">
\r
438 <div class="exampleblock-content">
\r
449 <div class="sectionbody">
\r
450 <p>In addition to the above, as a short-hand, the name of a
\r
451 file in <tt>$GIT_DIR/remotes</tt> directory can be given; the
\r
452 named file should be in the following format:</p>
\r
453 <div class="literalblock">
\r
454 <div class="content">
\r
455 <pre><tt>URL: one of the above URL format
\r
456 Push: <refspec>
\r
457 Pull: <refspec></tt></pre>
\r
459 <p>Then such a short-hand is specified in place of
\r
460 <repository> without <refspec> parameters on the command
\r
461 line, <refspec> specified on <tt>Push:</tt> lines or <tt>Pull:</tt>
\r
462 lines are used for <tt>git-push</tt> and <tt>git-fetch</tt>/<tt>git-pull</tt>,
\r
463 respectively. Multiple <tt>Push:</tt> and and <tt>Pull:</tt> lines may
\r
464 be specified for additional branch mappings.</p>
\r
465 <p>The name of a file in <tt>$GIT_DIR/branches</tt> directory can be
\r
466 specified as an older notation short-hand; the named
\r
467 file should contain a single line, a URL in one of the
\r
468 above formats, optionally followed by a hash <tt>#</tt> and the
\r
469 name of remote head (URL fragment notation).
\r
470 <tt>$GIT_DIR/branches/<remote></tt> file that stores a <url>
\r
471 without the fragment is equivalent to have this in the
\r
472 corresponding file in the <tt>$GIT_DIR/remotes/</tt> directory.</p>
\r
473 <div class="literalblock">
\r
474 <div class="content">
\r
475 <pre><tt>URL: <url>
\r
476 Pull: refs/heads/master:<remote></tt></pre>
\r
478 <p>while having <tt><url>#<head></tt> is equivalent to</p>
\r
479 <div class="literalblock">
\r
480 <div class="content">
\r
481 <pre><tt>URL: <url>
\r
482 Pull: refs/heads/<head>:<remote></tt></pre>
\r
486 <div class="sectionbody">
\r
487 <p>Written by Junio C Hamano <junkio@cox.net></p>
\r
489 <h2>Documentation</h2>
\r
490 <div class="sectionbody">
\r
491 <p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p>
\r
494 <div class="sectionbody">
\r
495 <p>Part of the <a href="git.html">git(7)</a> suite</p>
\r
498 <div id="footer-text">
\r
499 Last updated 07-Feb-2006 08:04:31 UTC
\r