summaryrefslogtreecommitdiffstats
path: root/git-push.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-12-18 16:43:11 -0800
committerJunio C Hamano <gitster@pobox.com>2012-12-18 16:43:11 -0800
commit9d9711544dc3090db6e5c52f9ce9c300bf4f5c14 (patch)
tree23257b9801739fd96c9e82ef98a17500dce9f88e /git-push.html
parent9629d4f49e5ffcff5c5beb5c40bedcffcabcd905 (diff)
downloadgit-htmldocs-9d9711544dc3090db6e5c52f9ce9c300bf4f5c14.tar.gz
Autogenerated HTML docs for v1.8.1-rc2-5-g252f9
Diffstat (limited to 'git-push.html')
-rw-r--r--git-push.html651
1 files changed, 420 insertions, 231 deletions
diff --git a/git-push.html b/git-push.html
index 070e13d8b..f2c3d66ab 100644
--- a/git-push.html
+++ b/git-push.html
@@ -2,15 +2,25 @@
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.5.2" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.6.8" />
<title>git-push(1)</title>
<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
}
body {
@@ -35,13 +45,8 @@ strong {
color: #083194;
}
-tt {
- color: navy;
-}
-
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
- font-family: sans-serif;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
@@ -59,9 +64,11 @@ h3 {
h3 + * {
clear: left;
}
+h5 {
+ font-size: 1.0em;
+}
div.sectionbody {
- font-family: serif;
margin-left: 0;
}
@@ -77,45 +84,48 @@ p {
ul, ol, li > p {
margin-top: 0;
}
+ul > li { color: #aaa; }
+ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
-span#author {
+
+#author {
color: #527bbd;
- font-family: sans-serif;
font-weight: bold;
font-size: 1.1em;
}
-span#email {
+#email {
}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
+#revnumber, #revdate, #revremark {
}
-div#footer {
- font-family: sans-serif;
+#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
-div#footer-text {
+#footer-text {
float: left;
padding-bottom: 0.5em;
}
-div#footer-badges {
+#footer-badges {
float: right;
padding-bottom: 0.5em;
}
-div#preamble {
+#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
@@ -135,7 +145,6 @@ div.content { /* Block element content. */
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
- font-family: sans-serif;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
@@ -157,13 +166,15 @@ div.content + div.title {
div.sidebarblock > div.content {
background: #ffffee;
- border: 1px solid silver;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
padding: 0.5em;
}
@@ -171,8 +182,8 @@ div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
}
div.quoteblock > div.attribution {
@@ -180,8 +191,9 @@ div.quoteblock > div.attribution {
text-align: right;
}
-div.verseblock > div.content {
- white-space: pre;
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
@@ -254,35 +266,12 @@ div.compact div, div.compact div {
margin-bottom: 0.1em;
}
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
div.hdlist {
margin-top: 0.8em;
@@ -339,25 +328,32 @@ span.footnote, span.footnoteref {
min-width: 100px;
}
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
@media print {
- div#footer-badges { display: none; }
+ #footer-badges { display: none; }
}
-div#toc {
+#toc {
margin-bottom: 2.5em;
}
-div#toctitle {
+#toctitle {
color: #527bbd;
- font-family: sans-serif;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -373,69 +369,173 @@ div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+div.unbreakable { page-break-inside: avoid; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
}
-h2 {
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
border-style: none;
}
-div.sectionbody {
- margin-left: 5%;
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
}
-
-@media print {
- div#toc { display: none; }
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
}
-/* Workarounds for IE6's broken and incomplete CSS2. */
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
+thead, p.tableblock.header {
font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
}
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
}
-div.quoteblock-attribution {
- padding-top: 0.5em;
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
-div.verseblock-content {
- white-space: pre;
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
}
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
+}
+
+@media print {
+ body.manpage div#toc { display: none; }
}
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
var asciidoc = { // Namespace.
/////////////////////////////////////////////////////////////////////
@@ -477,7 +577,7 @@ toc: function (toclevels) {
function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -497,6 +597,25 @@ toc: function (toclevels) {
}
var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
@@ -524,24 +643,44 @@ toc: function (toclevels) {
*/
footnotes: function () {
- var cont = document.getElementById("content");
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
@@ -561,13 +700,36 @@ footnotes: function () {
}
}
}
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
}
}
+asciidoc.install();
/*]]>*/
</script>
</head>
-<body>
+<body class="manpage">
<div id="header">
<h1>
git-push(1) Manual Page
@@ -580,15 +742,18 @@ git-push(1) Manual Page
</div>
</div>
<div id="content">
+<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<div class="verseblock-content"><em>git push</em> [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=&lt;git-receive-pack&gt;]
+<pre class="content"><em>git push</em> [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=&lt;git-receive-pack&gt;]
[--repo=&lt;repository&gt;] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
- [&lt;repository&gt; [&lt;refspec&gt;&#8230;]]</div>
-<div class="verseblock-attribution">
+ [&lt;repository&gt; [&lt;refspec&gt;&#8230;]]</pre>
+<div class="attribution">
</div></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph"><p>Updates remote refs using local refs, while sending objects
@@ -597,6 +762,8 @@ necessary to complete the given refs.</p></div>
every time you push into it, by setting up <em>hooks</em> there. See
documentation for <a href="git-receive-pack.html">git-receive-pack(1)</a>.</p></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_options_a_id_options_a">OPTIONS<a id="OPTIONS"></a></h2>
<div class="sectionbody">
<div class="dlist"><dl>
@@ -617,36 +784,36 @@ documentation for <a href="git-receive-pack.html">git-receive-pack(1)</a>.</p></
<dd>
<p>
The format of a &lt;refspec&gt; parameter is an optional plus
- <tt>+</tt>, followed by the source ref &lt;src&gt;, followed
- by a colon <tt>:</tt>, followed by the destination ref &lt;dst&gt;.
+ <code>+</code>, followed by the source ref &lt;src&gt;, followed
+ by a colon <code>:</code>, followed by the destination ref &lt;dst&gt;.
It is used to specify with what &lt;src&gt; object the &lt;dst&gt; ref
in the remote repository is to be updated. If not specified,
- the behavior of the command is controlled by the <tt>push.default</tt>
+ the behavior of the command is controlled by the <code>push.default</code>
configuration variable.
</p>
<div class="paragraph"><p>The &lt;src&gt; is often the name of the branch you would want to push, but
-it can be any arbitrary "SHA-1 expression", such as <tt>master~4</tt> or
-<tt>HEAD</tt> (see <a href="gitrevisions.html">gitrevisions(7)</a>).</p></div>
+it can be any arbitrary "SHA-1 expression", such as <code>master~4</code> or
+<code>HEAD</code> (see <a href="gitrevisions.html">gitrevisions(7)</a>).</p></div>
<div class="paragraph"><p>The &lt;dst&gt; tells which ref on the remote side is updated with this
push. Arbitrary expressions cannot be used here, an actual ref must
-be named. If <tt>:</tt>&lt;dst&gt; is omitted, the same ref as &lt;src&gt; will be
+be named. If <code>:</code>&lt;dst&gt; is omitted, the same ref as &lt;src&gt; will be
updated.</p></div>
<div class="paragraph"><p>The object referenced by &lt;src&gt; is used to update the &lt;dst&gt; reference
on the remote side, but by default this is only allowed if the
-update can fast-forward &lt;dst&gt;. By having the optional leading <tt>+</tt>,
+update can fast-forward &lt;dst&gt;. By having the optional leading <code>+</code>,
you can tell git to update the &lt;dst&gt; ref even when the update is not a
fast-forward. This does <strong>not</strong> attempt to merge &lt;src&gt; into &lt;dst&gt;. See
EXAMPLES below for details.</p></div>
-<div class="paragraph"><p><tt>tag &lt;tag&gt;</tt> means the same as <tt>refs/tags/&lt;tag&gt;:refs/tags/&lt;tag&gt;</tt>.</p></div>
+<div class="paragraph"><p><code>tag &lt;tag&gt;</code> means the same as <code>refs/tags/&lt;tag&gt;:refs/tags/&lt;tag&gt;</code>.</p></div>
<div class="paragraph"><p>Pushing an empty &lt;src&gt; allows you to delete the &lt;dst&gt; ref from
the remote repository.</p></div>
-<div class="paragraph"><p>The special refspec <tt>:</tt> (or <tt>+:</tt> to allow non-fast-forward updates)
+<div class="paragraph"><p>The special refspec <code>:</code> (or <code>+:</code> to allow non-fast-forward updates)
directs git to push "matching" branches: for every branch that exists on
the local side, the remote side is updated if a branch of the same name
already exists on the remote side. This is the default operation mode
if no explicit refspec is found (that is neither on the command line
nor in any Push line of the corresponding remotes file---see below) and
-no <tt>push.default</tt> configuration variable is set.</p></div>
+no <code>push.default</code> configuration variable is set.</p></div>
</dd>
<dt class="hdlist1">
--all
@@ -654,7 +821,7 @@ no <tt>push.default</tt> configuration variable is set.</p></div>
<dd>
<p>
Instead of naming each ref to push, specifies that all
- refs under <tt>refs/heads/</tt> be pushed.
+ refs under <code>refs/heads/</code> be pushed.
</p>
</dd>
<dt class="hdlist1">
@@ -663,10 +830,10 @@ no <tt>push.default</tt> configuration variable is set.</p></div>
<dd>
<p>
Remove remote branches that don&#8217;t have a local counterpart. For example
- a remote branch <tt>tmp</tt> will be removed if a local branch with the same
+ a remote branch <code>tmp</code> will be removed if a local branch with the same
name doesn&#8217;t exist any more. This also respects refspecs, e.g.
- <tt>git push --prune remote refs/heads/*:refs/tmp/*</tt> would
- make sure that remote <tt>refs/tmp/foo</tt> will be removed if <tt>refs/heads/foo</tt>
+ <code>git push --prune remote refs/heads/*:refs/tmp/*</code> would
+ make sure that remote <code>refs/tmp/foo</code> will be removed if <code>refs/heads/foo</code>
doesn&#8217;t exist.
</p>
</dd>
@@ -676,13 +843,13 @@ no <tt>push.default</tt> configuration variable is set.</p></div>
<dd>
<p>
Instead of naming each ref to push, specifies that all
- refs under <tt>refs/</tt> (which includes but is not
- limited to <tt>refs/heads/</tt>, <tt>refs/remotes/</tt>, and <tt>refs/tags/</tt>)
+ refs under <code>refs/</code> (which includes but is not
+ limited to <code>refs/heads/</code>, <code>refs/remotes/</code>, and <code>refs/tags/</code>)
be mirrored to the remote repository. Newly created local
refs will be pushed to the remote end, locally updated refs
will be force updated on the remote end, and deleted refs
will be removed from the remote end. This is the default
- if the configuration option <tt>remote.&lt;remote&gt;.mirror</tt> is
+ if the configuration option <code>remote.&lt;remote&gt;.mirror</code> is
set.
</p>
</dd>
@@ -721,7 +888,7 @@ no <tt>push.default</tt> configuration variable is set.</p></div>
</dt>
<dd>
<p>
- All refs under <tt>refs/tags</tt> are pushed, in
+ All refs under <code>refs/tags</code> are pushed, in
addition to refspecs explicitly listed on the command
line.
</p>
@@ -769,8 +936,8 @@ no <tt>push.default</tt> configuration variable is set.</p></div>
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>git push public #1
-git push --repo=public #2</tt></pre>
+<pre><code>git push public #1
+git push --repo=public #2</code></pre>
</div></div>
<div class="paragraph"><p>is that #1 always pushes to "public" whereas #2 pushes to "public"
only if the current branch does not track a remote branch. This is
@@ -857,6 +1024,8 @@ useful if you write an alias or script around <em>git push</em>.</p></div>
</dd>
</dl></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_git_urls_a_id_urls_a">GIT URLS<a id="URLS"></a></h2>
<div class="sectionbody">
<div class="paragraph"><p>In general, URLs contain information about the transport protocol, the
@@ -958,15 +1127,15 @@ use will be rewritten into URLs that work), you can create a
configuration section of the form:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> [url "&lt;actual url base&gt;"]
- insteadOf = &lt;other url base&gt;</tt></pre>
+<pre><code> [url "&lt;actual url base&gt;"]
+ insteadOf = &lt;other url base&gt;</code></pre>
</div></div>
<div class="paragraph"><p>For example, with this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> [url "git://git.host.xz/"]
+<pre><code> [url "git://git.host.xz/"]
insteadOf = host.xz:/path/to/
- insteadOf = work:</tt></pre>
+ insteadOf = work:</code></pre>
</div></div>
<div class="paragraph"><p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p></div>
@@ -974,102 +1143,112 @@ rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p
configuration section of the form:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> [url "&lt;actual url base&gt;"]
- pushInsteadOf = &lt;other url base&gt;</tt></pre>
+<pre><code> [url "&lt;actual url base&gt;"]
+ pushInsteadOf = &lt;other url base&gt;</code></pre>
</div></div>
<div class="paragraph"><p>For example, with this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> [url "ssh://example.org/"]
- pushInsteadOf = git://example.org/</tt></pre>
+<pre><code> [url "ssh://example.org/"]
+ pushInsteadOf = git://example.org/</code></pre>
</div></div>
<div class="paragraph"><p>a URL like "git://example.org/path/to/repo.git" will be rewritten to
"ssh://example.org/path/to/repo.git" for pushes, but pulls will still
use the original URL.</p></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_remotes_a_id_remotes_a">REMOTES<a id="REMOTES"></a></h2>
<div class="sectionbody">
<div class="paragraph"><p>The name of one of the following can be used instead
-of a URL as <tt>&lt;repository&gt;</tt> argument:</p></div>
+of a URL as <code>&lt;repository&gt;</code> argument:</p></div>
<div class="ulist"><ul>
<li>
<p>
-a remote in the git configuration file: <tt>$GIT_DIR/config</tt>,
+a remote in the git configuration file: <code>$GIT_DIR/config</code>,
</p>
</li>
<li>
<p>
-a file in the <tt>$GIT_DIR/remotes</tt> directory, or
+a file in the <code>$GIT_DIR/remotes</code> directory, or
</p>
</li>
<li>
<p>
-a file in the <tt>$GIT_DIR/branches</tt> directory.
+a file in the <code>$GIT_DIR/branches</code> directory.
</p>
</li>
</ul></div>
<div class="paragraph"><p>All of these also allow you to omit the refspec from the command line
because they each contain a refspec which git will use by default.</p></div>
-<h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3><div style="clear:left"></div>
+<div class="sect2">
+<h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3>
<div class="paragraph"><p>You can choose to provide the name of a remote which you had previously
configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a>
-or even by a manual edit to the <tt>$GIT_DIR/config</tt> file. The URL of
+or even by a manual edit to the <code>$GIT_DIR/config</code> file. The URL of
this remote will be used to access the repository. The refspec
of this remote will be used by default when you do
not provide a refspec on the command line. The entry in the
config file would appear like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> [remote "&lt;name&gt;"]
+<pre><code> [remote "&lt;name&gt;"]
url = &lt;url&gt;
pushurl = &lt;pushurl&gt;
push = &lt;refspec&gt;
- fetch = &lt;refspec&gt;</tt></pre>
+ fetch = &lt;refspec&gt;</code></pre>
</div></div>
-<div class="paragraph"><p>The <tt>&lt;pushurl&gt;</tt> is used for pushes only. It is optional and defaults
-to <tt>&lt;url&gt;</tt>.</p></div>
-<h3 id="_named_file_in_tt_git_dir_remotes_tt">Named file in <tt>$GIT_DIR/remotes</tt></h3><div style="clear:left"></div>
+<div class="paragraph"><p>The <code>&lt;pushurl&gt;</code> is used for pushes only. It is optional and defaults
+to <code>&lt;url&gt;</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_named_file_in_code_git_dir_remotes_code">Named file in <code>$GIT_DIR/remotes</code></h3>
<div class="paragraph"><p>You can choose to provide the name of a
-file in <tt>$GIT_DIR/remotes</tt>. The URL
+file in <code>$GIT_DIR/remotes</code>. The URL
in this file will be used to access the repository. The refspec
in this file will be used as default when you do not
provide a refspec on the command line. This file should have the
following format:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> URL: one of the above URL format
+<pre><code> URL: one of the above URL format
Push: &lt;refspec&gt;
- Pull: &lt;refspec&gt;</tt></pre>
+ Pull: &lt;refspec&gt;</code></pre>
</div></div>
-<div class="paragraph"><p><tt>Push:</tt> lines are used by <em>git push</em> and
-<tt>Pull:</tt> lines are used by <em>git pull</em> and <em>git fetch</em>.
-Multiple <tt>Push:</tt> and <tt>Pull:</tt> lines may
+<div class="paragraph"><p><code>Push:</code> lines are used by <em>git push</em> and
+<code>Pull:</code> lines are used by <em>git pull</em> and <em>git fetch</em>.
+Multiple <code>Push:</code> and <code>Pull:</code> lines may
be specified for additional branch mappings.</p></div>
-<h3 id="_named_file_in_tt_git_dir_branches_tt">Named file in <tt>$GIT_DIR/branches</tt></h3><div style="clear:left"></div>
+</div>
+<div class="sect2">
+<h3 id="_named_file_in_code_git_dir_branches_code">Named file in <code>$GIT_DIR/branches</code></h3>
<div class="paragraph"><p>You can choose to provide the name of a
-file in <tt>$GIT_DIR/branches</tt>.
+file in <code>$GIT_DIR/branches</code>.
The URL in this file will be used to access the repository.
This file should have the following format:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> &lt;url&gt;#&lt;head&gt;</tt></pre>
+<pre><code> &lt;url&gt;#&lt;head&gt;</code></pre>
</div></div>
-<div class="paragraph"><p><tt>&lt;url&gt;</tt> is required; <tt>#&lt;head&gt;</tt> is optional.</p></div>
+<div class="paragraph"><p><code>&lt;url&gt;</code> is required; <code>#&lt;head&gt;</code> is optional.</p></div>
<div class="paragraph"><p>Depending on the operation, git will use one of the following
refspecs, if you don&#8217;t provide one on the command line.
-<tt>&lt;branch&gt;</tt> is the name of this file in <tt>$GIT_DIR/branches</tt> and
-<tt>&lt;head&gt;</tt> defaults to <tt>master</tt>.</p></div>
+<code>&lt;branch&gt;</code> is the name of this file in <code>$GIT_DIR/branches</code> and
+<code>&lt;head&gt;</code> defaults to <code>master</code>.</p></div>
<div class="paragraph"><p>git fetch uses:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> refs/heads/&lt;head&gt;:refs/heads/&lt;branch&gt;</tt></pre>
+<pre><code> refs/heads/&lt;head&gt;:refs/heads/&lt;branch&gt;</code></pre>
</div></div>
<div class="paragraph"><p>git push uses:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> HEAD:refs/heads/&lt;head&gt;</tt></pre>
+<pre><code> HEAD:refs/heads/&lt;head&gt;</code></pre>
</div></div>
</div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_output">OUTPUT</h2>
<div class="sectionbody">
<div class="paragraph"><p>The output of "git push" depends on the transport method used; this
@@ -1079,12 +1258,12 @@ locally or via ssh).</p></div>
representing the status of a single ref. Each line is of the form:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> &lt;flag&gt; &lt;summary&gt; &lt;from&gt; -&gt; &lt;to&gt; (&lt;reason&gt;)</tt></pre>
+<pre><code> &lt;flag&gt; &lt;summary&gt; &lt;from&gt; -&gt; &lt;to&gt; (&lt;reason&gt;)</code></pre>
</div></div>
<div class="paragraph"><p>If --porcelain is used, then each line of the output is of the form:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> &lt;flag&gt; \t &lt;from&gt;:&lt;to&gt; \t &lt;summary&gt; (&lt;reason&gt;)</tt></pre>
+<pre><code> &lt;flag&gt; \t &lt;from&gt;:&lt;to&gt; \t &lt;summary&gt; (&lt;reason&gt;)</code></pre>
</div></div>
<div class="paragraph"><p>The status of up-to-date refs is shown only if --porcelain or --verbose
option is used.</p></div>
@@ -1106,7 +1285,7 @@ for a successfully pushed fast-forward;
</p>
</dd>
<dt class="hdlist1">
-<tt>+</tt>
+<code>+</code>
</dt>
<dd>
<p>
@@ -1114,7 +1293,7 @@ for a successful forced update;
</p>
</dd>
<dt class="hdlist1">
-<tt>-</tt>
+<code>-</code>
</dt>
<dd>
<p>
@@ -1122,7 +1301,7 @@ for a successfully deleted ref;
</p>
</dd>
<dt class="hdlist1">
-<tt>*</tt>
+<code>*</code>
</dt>
<dd>
<p>
@@ -1130,7 +1309,7 @@ for a successfully pushed new ref;
</p>
</dd>
<dt class="hdlist1">
-<tt>!</tt>
+<code>!</code>
</dt>
<dd>
<p>
@@ -1138,7 +1317,7 @@ for a ref that was rejected or failed to push; and
</p>
</dd>
<dt class="hdlist1">
-<tt>=</tt>
+<code>=</code>
</dt>
<dd>
<p>
@@ -1154,10 +1333,12 @@ summary
<p>
For a successfully pushed ref, the summary shows the old and new
values of the ref in a form suitable for using as an argument to
- <tt>git log</tt> (this is <tt>&lt;old&gt;..&lt;new&gt;</tt> in most cases, and
- <tt>&lt;old&gt;...&lt;new&gt;</tt> for forced non-fast-forward updates).
+ <code>git log</code> (this is <code>&lt;old&gt;..&lt;new&gt;</code> in most cases, and
+ <code>&lt;old&gt;...&lt;new&gt;</code> for forced non-fast-forward updates).
</p>
<div class="paragraph"><p>For a failed update, more details are given:</p></div>
+<div class="openblock">
+<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
rejected
@@ -1176,10 +1357,10 @@ remote rejected
The remote end refused the update. Usually caused by a hook
on the remote side, or because the remote repository has one
of the following safety options in effect:
- <tt>receive.denyCurrentBranch</tt> (for pushes to the checked out
- branch), <tt>receive.denyNonFastForwards</tt> (for forced
- non-fast-forward updates), <tt>receive.denyDeletes</tt> or
- <tt>receive.denyDeleteCurrent</tt>. See <a href="git-config.html">git-config(1)</a>.
+ <code>receive.denyCurrentBranch</code> (for pushes to the checked out
+ branch), <code>receive.denyNonFastForwards</code> (for forced
+ non-fast-forward updates), <code>receive.denyDeletes</code> or
+ <code>receive.denyDeleteCurrent</code>. See <a href="git-config.html">git-config(1)</a>.
</p>
</dd>
<dt class="hdlist1">
@@ -1193,6 +1374,7 @@ remote failure
</p>
</dd>
</dl></div>
+</div></div>
</dd>
<dt class="hdlist1">
from
@@ -1200,7 +1382,7 @@ from
<dd>
<p>
The name of the local ref being pushed, minus its
- <tt>refs/&lt;type&gt;/</tt> prefix. In the case of deletion, the
+ <code>refs/&lt;type&gt;/</code> prefix. In the case of deletion, the
name of the local ref is omitted.
</p>
</dd>
@@ -1210,7 +1392,7 @@ to
<dd>
<p>
The name of the remote ref being updated, minus its
- <tt>refs/&lt;type&gt;/</tt> prefix.
+ <code>refs/&lt;type&gt;/</code> prefix.
</p>
</dd>
<dt class="hdlist1">
@@ -1225,6 +1407,8 @@ reason
</dd>
</dl></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_note_about_fast_forwards">Note about fast-forwards</h2>
<div class="sectionbody">
<div class="paragraph"><p>When an update changes a branch (or more in general, a ref) that used to
@@ -1239,9 +1423,9 @@ a history leading to commit B while the other person built a history
leading to commit A. The history looks like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> B
+<pre><code> B
/
- ---X---A</tt></pre>
+ ---X---A</code></pre>
</div></div>
<div class="paragraph"><p>Further suppose that the other person already pushed changes leading to A
back to the original repository from which you two obtained the original
@@ -1263,9 +1447,9 @@ the result. A "git pull" will create a merge commit C between commits A
and B.</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> B---C
+<pre><code> B---C
/ /
- ---X---A</tt></pre>
+ ---X---A</code></pre>
</div></div>
<div class="paragraph"><p>Updating A with the resulting merge commit will fast-forward and your
push will be accepted.</p></div>
@@ -1275,9 +1459,9 @@ create a new commit D that builds the change between X and B on top of
A.</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> B D
+<pre><code> B D
/ /
- ---X---A</tt></pre>
+ ---X---A</code></pre>
</div></div>
<div class="paragraph"><p>Again, updating A with this commit will fast-forward and your push will be
accepted.</p></div>
@@ -1292,59 +1476,61 @@ you are certain that nobody in the meantime fetched your earlier commit A
overwrite it. In other words, "git push --force" is a method reserved for
a case where you do mean to lose history.</p></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_examples">Examples</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
-<tt>git push</tt>
+<code>git push</code>
</dt>
<dd>
<p>
- Works like <tt>git push &lt;remote&gt;</tt>, where &lt;remote&gt; is the
- current branch&#8217;s remote (or <tt>origin</tt>, if no remote is
+ Works like <code>git push &lt;remote&gt;</code>, where &lt;remote&gt; is the
+ current branch&#8217;s remote (or <code>origin</code>, if no remote is
configured for the current branch).
</p>
</dd>
<dt class="hdlist1">
-<tt>git push origin</tt>
+<code>git push origin</code>
</dt>
<dd>
<p>
Without additional configuration, works like
- <tt>git push origin :</tt>.
+ <code>git push origin :</code>.
</p>
<div class="paragraph"><p>The default behavior of this command when no &lt;refspec&gt; is given can be
-configured by setting the <tt>push</tt> option of the remote, or the <tt>push.default</tt>
+configured by setting the <code>push</code> option of the remote, or the <code>push.default</code>
configuration variable.</p></div>
-<div class="paragraph"><p>For example, to default to pushing only the current branch to <tt>origin</tt>
-use <tt>git config remote.origin.push HEAD</tt>. Any valid &lt;refspec&gt; (like
+<div class="paragraph"><p>For example, to default to pushing only the current branch to <code>origin</code>
+use <code>git config remote.origin.push HEAD</code>. Any valid &lt;refspec&gt; (like
the ones in the examples below) can be configured as the default for
-<tt>git push origin</tt>.</p></div>
+<code>git push origin</code>.</p></div>
</dd>
<dt class="hdlist1">
-<tt>git push origin :</tt>
+<code>git push origin :</code>
</dt>
<dd>
<p>
- Push "matching" branches to <tt>origin</tt>. See
+ Push "matching" branches to <code>origin</code>. See
&lt;refspec&gt; in the <a href="#OPTIONS">OPTIONS</a> section above for a
description of "matching" branches.
</p>
</dd>
<dt class="hdlist1">
-<tt>git push origin master</tt>
+<code>git push origin master</code>
</dt>
<dd>
<p>
- Find a ref that matches <tt>master</tt> in the source repository
- (most likely, it would find <tt>refs/heads/master</tt>), and update
- the same ref (e.g. <tt>refs/heads/master</tt>) in <tt>origin</tt> repository
- with it. If <tt>master</tt> did not exist remotely, it would be
+ Find a ref that matches <code>master</code> in the source repository
+ (most likely, it would find <code>refs/heads/master</code>), and update
+ the same ref (e.g. <code>refs/heads/master</code>) in <code>origin</code> repository
+ with it. If <code>master</code> did not exist remotely, it would be
created.
</p>
</dd>
<dt class="hdlist1">
-<tt>git push origin HEAD</tt>
+<code>git push origin HEAD</code>
</dt>
<dd>
<p>
@@ -1353,59 +1539,59 @@ the ones in the examples below) can be configured as the default for
</p>
</dd>
<dt class="hdlist1">
-<tt>git push mothership master:satellite/master dev:satellite/dev</tt>
+<code>git push mothership master:satellite/master dev:satellite/dev</code>
</dt>
<dd>
<p>
- Use the source ref that matches <tt>master</tt> (e.g. <tt>refs/heads/master</tt>)
- to update the ref that matches <tt>satellite/master</tt> (most probably
- <tt>refs/remotes/satellite/master</tt>) in the <tt>mothership</tt> repository;
- do the same for <tt>dev</tt> and <tt>satellite/dev</tt>.
+ Use the source ref that matches <code>master</code> (e.g. <code>refs/heads/master</code>)
+ to update the ref that matches <code>satellite/master</code> (most probably
+ <code>refs/remotes/satellite/master</code>) in the <code>mothership</code> repository;
+ do the same for <code>dev</code> and <code>satellite/dev</code>.
</p>
-<div class="paragraph"><p>This is to emulate <tt>git fetch</tt> run on the <tt>mothership</tt> using <tt>git
-push</tt> that is run in the opposite direction in order to integrate
-the work done on <tt>satellite</tt>, and is often necessary when you can
+<div class="paragraph"><p>This is to emulate <code>git fetch</code> run on the <code>mothership</code> using <code>git
+push</code> that is run in the opposite direction in order to integrate
+the work done on <code>satellite</code>, and is often necessary when you can
only make connection in one way (i.e. satellite can ssh into
mothership but mothership cannot initiate connection to satellite
because the latter is behind a firewall or does not run sshd).</p></div>
-<div class="paragraph"><p>After running this <tt>git push</tt> on the <tt>satellite</tt> machine, you would
-ssh into the <tt>mothership</tt> and run <tt>git merge</tt> there to complete the
-emulation of <tt>git pull</tt> that were run on <tt>mothership</tt> to pull changes
-made on <tt>satellite</tt>.</p></div>
+<div class="paragraph"><p>After running this <code>git push</code> on the <code>satellite</code> machine, you would
+ssh into the <code>mothership</code> and run <code>git merge</code> there to complete the
+emulation of <code>git pull</code> that were run on <code>mothership</code> to pull changes
+made on <code>satellite</code>.</p></div>
</dd>
<dt class="hdlist1">
-<tt>git push origin HEAD:master</tt>
+<code>git push origin HEAD:master</code>
</dt>
<dd>
<p>
- Push the current branch to the remote ref matching <tt>master</tt> in the
- <tt>origin</tt> repository. This form is convenient to push the current
+ Push the current branch to the remote ref matching <code>master</code> in the
+ <code>origin</code> repository. This form is convenient to push the current
branch without thinking about its local name.
</p>
</dd>
<dt class="hdlist1">
-<tt>git push origin master:refs/heads/experimental</tt>
+<code>git push origin master:refs/heads/experimental</code>
</dt>
<dd>
<p>
- Create the branch <tt>experimental</tt> in the <tt>origin</tt> repository
- by copying the current <tt>master</tt> branch. This form is only
+ Create the branch <code>experimental</code> in the <code>origin</code> repository
+ by copying the current <code>master</code> branch. This form is only
needed to create a new branch or tag in the remote repository when
the local name and the remote name are different; otherwise,
the ref name on its own will work.
</p>
</dd>
<dt class="hdlist1">
-<tt>git push origin :experimental</tt>
+<code>git push origin :experimental</code>
</dt>
<dd>
<p>
- Find a ref that matches <tt>experimental</tt> in the <tt>origin</tt> repository
- (e.g. <tt>refs/heads/experimental</tt>), and delete it.
+ Find a ref that matches <code>experimental</code> in the <code>origin</code> repository
+ (e.g. <code>refs/heads/experimental</code>), and delete it.
</p>
</dd>
<dt class="hdlist1">
-<tt>git push origin +dev:master</tt>
+<code>git push origin +dev:master</code>
</dt>
<dd>
<p>
@@ -1416,32 +1602,35 @@ made on <tt>satellite</tt>.</p></div>
</p>
<div class="listingblock">
<div class="content">
-<pre><tt> o---o---o---A---B origin/master
+<pre><code> o---o---o---A---B origin/master
\
- X---Y---Z dev</tt></pre>
+ X---Y---Z dev</code></pre>
</div></div>
<div class="paragraph"><p>The above command would change the origin repository to</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> A---B (unnamed branch)
+<pre><code> A---B (unnamed branch)
/
- o---o---o---X---Y---Z master</tt></pre>
+ o---o---o---X---Y---Z master</code></pre>
</div></div>
<div class="paragraph"><p>Commits A and B would no longer belong to a branch with a symbolic name,
and so would be unreachable. As such, these commits would be removed by
-a <tt>git gc</tt> command on the origin repository.</p></div>
+a <code>git gc</code> command on the origin repository.</p></div>
</dd>
</dl></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_git">GIT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
</div>
</div>
+</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2012-11-29 14:50:58 PDT
+Last updated 2012-11-29 14:50:58 PST
</div>
</div>
</body>