Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!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 Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-push(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-push(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-push - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 317 | Update remote refs along with associated objects |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
Junio C Hamano | a9b8d24 | 2007-05-19 04:51:55 | [diff] [blame] | 323 | <div class="verseblock"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 324 | <div class="content"><em>git push</em> [--all | --mirror] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>] |
| 325 | [--repo=<repository>] [-f | --force] [-v | --verbose] |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 326 | [<repository> <refspec>…]</div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 327 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 328 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 329 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 330 | <div class="para"><p>Updates remote refs using local refs, while sending objects |
| 331 | necessary to complete the given refs.</p></div> |
| 332 | <div class="para"><p>You can make interesting things happen to a repository |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 333 | every time you push into it, by setting up <em>hooks</em> there. See |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 334 | documentation for <a href="git-receive-pack.html">git-receive-pack(1)</a>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 335 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 336 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 337 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 338 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 339 | <dt> |
| 340 | <repository> |
| 341 | </dt> |
| 342 | <dd> |
| 343 | <p> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 344 | The "remote" repository that is destination of a push |
| 345 | operation. See the section <a href="#URLS">GIT URLS</a> below. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 346 | </p> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 347 | </dd> |
| 348 | <dt> |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 349 | <refspec>… |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 350 | </dt> |
| 351 | <dd> |
| 352 | <p> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 353 | The canonical format of a <refspec> parameter is |
| 354 | <tt>+?<src>:<dst></tt>; that is, an optional plus <tt>+</tt>, followed |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 355 | by the source ref, followed by a colon <tt>:</tt>, followed by |
| 356 | the destination ref. |
| 357 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 358 | <div class="para"><p>The <src> side represents the source branch (or arbitrary |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 359 | "SHA1 expression", such as <tt>master~4</tt> (four parents before the |
| 360 | tip of <tt>master</tt> branch); see <a href="git-rev-parse.html">git-rev-parse(1)</a>) that you |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 361 | want to push. The <dst> side represents the destination location.</p></div> |
| 362 | <div class="para"><p>The local ref that matches <src> is used |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 363 | to fast forward the remote ref that matches <dst> (or, if no <dst> was |
| 364 | specified, the same ref that <src> referred to locally). If |
| 365 | the optional leading plus <tt>+</tt> is used, the remote ref is updated |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 366 | even if it does not result in a fast forward update.</p></div> |
| 367 | <div class="para"><p><tt>tag <tag></tt> means the same as <tt>refs/tags/<tag>:refs/tags/<tag></tt>.</p></div> |
| 368 | <div class="para"><p>A parameter <ref> without a colon pushes the <ref> from the source |
| 369 | repository to the destination repository under the same name.</p></div> |
| 370 | <div class="para"><p>Pushing an empty <src> allows you to delete the <dst> ref from |
| 371 | the remote repository.</p></div> |
| 372 | <div class="para"><p>The special refspec <tt>:</tt> (or <tt>+:</tt> to allow non-fast forward updates) |
Junio C Hamano | b713ff1 | 2008-05-24 01:12:30 | [diff] [blame] | 373 | directs git to push "matching" heads: for every head that exists on |
| 374 | the local side, the remote side is updated if a head of the same name |
| 375 | already exists on the remote side. This is the default operation mode |
| 376 | if no explicit refspec is found (that is neither on the command line |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 377 | nor in any Push line of the corresponding remotes file---see below).</p></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 378 | </dd> |
| 379 | <dt> |
| 380 | --all |
| 381 | </dt> |
| 382 | <dd> |
| 383 | <p> |
| 384 | Instead of naming each ref to push, specifies that all |
Junio C Hamano | d2d9ae1 | 2007-09-19 02:27:57 | [diff] [blame] | 385 | refs under <tt>$GIT_DIR/refs/heads/</tt> be pushed. |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 386 | </p> |
| 387 | </dd> |
| 388 | <dt> |
Junio C Hamano | 9d2bbb7 | 2007-11-25 04:56:07 | [diff] [blame] | 389 | --mirror |
| 390 | </dt> |
| 391 | <dd> |
| 392 | <p> |
| 393 | Instead of naming each ref to push, specifies that all |
Junio C Hamano | a351d14 | 2008-06-21 09:40:40 | [diff] [blame] | 394 | refs under <tt>$GIT_DIR/refs/</tt> (which includes but is not |
| 395 | limited to <tt>refs/heads/</tt>, <tt>refs/remotes/</tt>, and <tt>refs/tags/</tt>) |
Junio C Hamano | 9d2bbb7 | 2007-11-25 04:56:07 | [diff] [blame] | 396 | be mirrored to the remote repository. Newly created local |
| 397 | refs will be pushed to the remote end, locally updated refs |
| 398 | will be force updated on the remote end, and deleted refs |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 399 | will be removed from the remote end. This is the default |
| 400 | if the configuration option <tt>remote.<remote>.mirror</tt> is |
| 401 | set. |
Junio C Hamano | 9d2bbb7 | 2007-11-25 04:56:07 | [diff] [blame] | 402 | </p> |
| 403 | </dd> |
| 404 | <dt> |
Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 405 | --dry-run |
| 406 | </dt> |
| 407 | <dd> |
| 408 | <p> |
| 409 | Do everything except actually send the updates. |
| 410 | </p> |
| 411 | </dd> |
| 412 | <dt> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 413 | --tags |
| 414 | </dt> |
| 415 | <dd> |
| 416 | <p> |
| 417 | All refs under <tt>$GIT_DIR/refs/tags</tt> are pushed, in |
| 418 | addition to refspecs explicitly listed on the command |
| 419 | line. |
| 420 | </p> |
| 421 | </dd> |
| 422 | <dt> |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 423 | --receive-pack=<git-receive-pack> |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 424 | </dt> |
| 425 | <dd> |
| 426 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 427 | Path to the <em>git-receive-pack</em> program on the remote |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 428 | end. Sometimes useful when pushing to a remote |
| 429 | repository over ssh, and you do not have the program in |
| 430 | a directory on the default $PATH. |
| 431 | </p> |
| 432 | </dd> |
| 433 | <dt> |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 434 | --exec=<git-receive-pack> |
| 435 | </dt> |
| 436 | <dd> |
| 437 | <p> |
| 438 | Same as --receive-pack=<git-receive-pack>. |
| 439 | </p> |
| 440 | </dd> |
| 441 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 442 | -f |
| 443 | </dt> |
| 444 | <dt> |
| 445 | --force |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 446 | </dt> |
| 447 | <dd> |
| 448 | <p> |
| 449 | Usually, the command refuses to update a remote ref that is |
Junio C Hamano | 4cd1c0e | 2007-08-06 04:39:14 | [diff] [blame] | 450 | not an ancestor of the local ref used to overwrite it. |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 451 | This flag disables the check. This can cause the |
| 452 | remote repository to lose commits; use it with care. |
| 453 | </p> |
| 454 | </dd> |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 455 | <dt> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 456 | --repo=<repository> |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 457 | </dt> |
| 458 | <dd> |
| 459 | <p> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 460 | This option is only relevant if no <repository> argument is |
| 461 | passed in the invocation. In this case, <em>git-push</em> derives the |
| 462 | remote name from the current branch: If it tracks a remote |
| 463 | branch, then that remote repository is pushed to. Otherwise, |
| 464 | the name "origin" is used. For this latter case, this option |
| 465 | can be used to override the name "origin". In other words, |
| 466 | the difference between these two commands |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 467 | </p> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 468 | <div class="listingblock"> |
| 469 | <div class="content"> |
| 470 | <pre><tt>git push public #1 |
| 471 | git push --repo=public #2</tt></pre> |
| 472 | </div></div> |
| 473 | <div class="para"><p>is that #1 always pushes to "public" whereas #2 pushes to "public" |
| 474 | only if the current branch does not track a remote branch. This is |
| 475 | useful if you write an alias or script around <em>git-push</em>.</p></div> |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 476 | </dd> |
| 477 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 478 | --thin |
| 479 | </dt> |
| 480 | <dt> |
| 481 | --no-thin |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 482 | </dt> |
| 483 | <dd> |
| 484 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 485 | These options are passed to <em>git-send-pack</em>. Thin |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 486 | transfer spends extra cycles to minimize the number of |
| 487 | objects to be sent and meant to be used on slower connection. |
| 488 | </p> |
| 489 | </dd> |
| 490 | <dt> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 491 | -v |
| 492 | </dt> |
| 493 | <dt> |
| 494 | --verbose |
Junio C Hamano | 1ce39ab | 2007-01-16 22:05:10 | [diff] [blame] | 495 | </dt> |
| 496 | <dd> |
| 497 | <p> |
| 498 | Run verbosely. |
| 499 | </p> |
| 500 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 501 | </dl></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 502 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 503 | <h2 id="_git_urls_a_id_urls_a">GIT URLS<a id="URLS"></a></h2> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 504 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 505 | <div class="para"><p>One of the following notations can be used |
| 506 | to name the remote repository:</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 507 | <div class="exampleblock"> |
| 508 | <div class="exampleblock-content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 509 | <div class="ilist"><ul> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 510 | <li> |
| 511 | <p> |
| 512 | rsync://host.xz/path/to/repo.git/ |
| 513 | </p> |
| 514 | </li> |
| 515 | <li> |
| 516 | <p> |
| 517 | http://host.xz/path/to/repo.git/ |
| 518 | </p> |
| 519 | </li> |
| 520 | <li> |
| 521 | <p> |
| 522 | https://host.xz/path/to/repo.git/ |
| 523 | </p> |
| 524 | </li> |
| 525 | <li> |
| 526 | <p> |
| 527 | git://host.xz/path/to/repo.git/ |
| 528 | </p> |
| 529 | </li> |
| 530 | <li> |
| 531 | <p> |
| 532 | git://host.xz/~user/path/to/repo.git/ |
| 533 | </p> |
| 534 | </li> |
| 535 | <li> |
| 536 | <p> |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 537 | ssh://[user@]host.xz[:port]/path/to/repo.git/ |
| 538 | </p> |
| 539 | </li> |
| 540 | <li> |
| 541 | <p> |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 542 | ssh://[user@]host.xz/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 543 | </p> |
| 544 | </li> |
| 545 | <li> |
| 546 | <p> |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 547 | ssh://[user@]host.xz/~user/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 548 | </p> |
| 549 | </li> |
| 550 | <li> |
| 551 | <p> |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 552 | ssh://[user@]host.xz/~/path/to/repo.git |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 553 | </p> |
| 554 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 555 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 556 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 557 | <div class="para"><p>SSH is the default transport protocol over the network. You can |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 558 | optionally specify which user to log-in as, and an alternate, |
| 559 | scp-like syntax is also supported. Both syntaxes support |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 560 | username expansion, as does the native git protocol, but |
| 561 | only the former supports port specification. The following |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 562 | three are identical to the last three above, respectively:</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 563 | <div class="exampleblock"> |
| 564 | <div class="exampleblock-content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 565 | <div class="ilist"><ul> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 566 | <li> |
| 567 | <p> |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 568 | [user@]host.xz:/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 569 | </p> |
| 570 | </li> |
| 571 | <li> |
| 572 | <p> |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 573 | [user@]host.xz:~user/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 574 | </p> |
| 575 | </li> |
| 576 | <li> |
| 577 | <p> |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 578 | [user@]host.xz:path/to/repo.git |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 579 | </p> |
| 580 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 581 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 582 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 583 | <div class="para"><p>To sync with a local directory, you can use:</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 584 | <div class="exampleblock"> |
| 585 | <div class="exampleblock-content"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 586 | <div class="ilist"><ul> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 587 | <li> |
| 588 | <p> |
| 589 | /path/to/repo.git/ |
| 590 | </p> |
| 591 | </li> |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 592 | <li> |
| 593 | <p> |
| 594 | file:///path/to/repo.git/ |
| 595 | </p> |
| 596 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 597 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 598 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 599 | <div class="para"><p>They are mostly equivalent, except when cloning. See |
| 600 | <a href="git-clone.html">git-clone(1)</a> for details.</p></div> |
| 601 | <div class="para"><p>If there are a large number of similarly-named remote repositories and |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 602 | you want to use a different format for them (such that the URLs you |
| 603 | use will be rewritten into URLs that work), you can create a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 604 | configuration section of the form:</p></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 605 | <div class="listingblock"> |
| 606 | <div class="content"> |
| 607 | <pre><tt> [url "<actual url base>"] |
| 608 | insteadOf = <other url base></tt></pre> |
| 609 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 610 | <div class="para"><p>For example, with this:</p></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 611 | <div class="listingblock"> |
| 612 | <div class="content"> |
| 613 | <pre><tt> [url "git://git.host.xz/"] |
| 614 | insteadOf = host.xz:/path/to/ |
| 615 | insteadOf = work:</tt></pre> |
| 616 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 617 | <div class="para"><p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be |
| 618 | rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 619 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 620 | <h2 id="_remotes_a_id_remotes_a">REMOTES<a id="REMOTES"></a></h2> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 621 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 622 | <div class="para"><p>The name of one of the following can be used instead |
| 623 | of a URL as <tt><repository></tt> argument:</p></div> |
| 624 | <div class="ilist"><ul> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 625 | <li> |
| 626 | <p> |
| 627 | a remote in the git configuration file: <tt>$GIT_DIR/config</tt>, |
| 628 | </p> |
| 629 | </li> |
| 630 | <li> |
| 631 | <p> |
| 632 | a file in the <tt>$GIT_DIR/remotes</tt> directory, or |
| 633 | </p> |
| 634 | </li> |
| 635 | <li> |
| 636 | <p> |
| 637 | a file in the <tt>$GIT_DIR/branches</tt> directory. |
| 638 | </p> |
| 639 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 640 | </ul></div> |
| 641 | <div class="para"><p>All of these also allow you to omit the refspec from the command line |
| 642 | because they each contain a refspec which git will use by default.</p></div> |
| 643 | <h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3><div style="clear:left"></div> |
| 644 | <div class="para"><p>You can choose to provide the name of a remote which you had previously |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 645 | configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a> |
| 646 | or even by a manual edit to the <tt>$GIT_DIR/config</tt> file. The URL of |
| 647 | this remote will be used to access the repository. The refspec |
| 648 | of this remote will be used by default when you do |
| 649 | not provide a refspec on the command line. The entry in the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 650 | config file would appear like this:</p></div> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 651 | <div class="listingblock"> |
| 652 | <div class="content"> |
| 653 | <pre><tt> [remote "<name>"] |
| 654 | url = <url> |
| 655 | push = <refspec> |
| 656 | fetch = <refspec></tt></pre> |
| 657 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 658 | <h3 id="_named_file_in_tt_git_dir_remotes_tt">Named file in <tt>$GIT_DIR/remotes</tt></h3><div style="clear:left"></div> |
| 659 | <div class="para"><p>You can choose to provide the name of a |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 660 | file in <tt>$GIT_DIR/remotes</tt>. The URL |
| 661 | in this file will be used to access the repository. The refspec |
| 662 | in this file will be used as default when you do not |
| 663 | provide a refspec on the command line. This file should have the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 664 | following format:</p></div> |
Junio C Hamano | 1caaf47 | 2006-12-31 08:29:35 | [diff] [blame] | 665 | <div class="listingblock"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 666 | <div class="content"> |
Junio C Hamano | d3361ad | 2007-01-01 03:20:24 | [diff] [blame] | 667 | <pre><tt> URL: one of the above URL format |
| 668 | Push: <refspec> |
| 669 | Pull: <refspec> |
| 670 | </tt></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 671 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 672 | <div class="para"><p><tt>Push:</tt> lines are used by <em>git-push</em> and |
| 673 | <tt>Pull:</tt> lines are used by <em>git-pull</em> and <em>git-fetch</em>. |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 674 | Multiple <tt>Push:</tt> and <tt>Pull:</tt> lines may |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 675 | be specified for additional branch mappings.</p></div> |
| 676 | <h3 id="_named_file_in_tt_git_dir_branches_tt">Named file in <tt>$GIT_DIR/branches</tt></h3><div style="clear:left"></div> |
| 677 | <div class="para"><p>You can choose to provide the name of a |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 678 | file in <tt>$GIT_DIR/branches</tt>. |
| 679 | The URL in this file will be used to access the repository. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 680 | This file should have the following format:</p></div> |
Junio C Hamano | 1caaf47 | 2006-12-31 08:29:35 | [diff] [blame] | 681 | <div class="listingblock"> |
Junio C Hamano | 249572f | 2006-10-24 05:44:08 | [diff] [blame] | 682 | <div class="content"> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 683 | <pre><tt> <url>#<head></tt></pre> |
Junio C Hamano | 249572f | 2006-10-24 05:44:08 | [diff] [blame] | 684 | </div></div> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame^] | 685 | <div class="para"><p><tt><url></tt> is required; <tt>#<head></tt> is optional.</p></div> |
| 686 | <div class="para"><p>Depending on the operation, git will use one of the following |
| 687 | refspecs, if you don't provide one on the command line. |
| 688 | <tt><branch></tt> is the name of this file in <tt>$GIT_DIR/branches</tt> and |
| 689 | <tt><head></tt> defaults to <tt>master</tt>.</p></div> |
| 690 | <div class="para"><p>git fetch uses:</p></div> |
Junio C Hamano | 1caaf47 | 2006-12-31 08:29:35 | [diff] [blame] | 691 | <div class="listingblock"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 692 | <div class="content"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame^] | 693 | <pre><tt> refs/heads/<head>:refs/heads/<branch></tt></pre> |
| 694 | </div></div> |
| 695 | <div class="para"><p>git push uses:</p></div> |
| 696 | <div class="listingblock"> |
| 697 | <div class="content"> |
| 698 | <pre><tt> HEAD:refs/heads/<head></tt></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 699 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 700 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 701 | <h2 id="_output">OUTPUT</h2> |
Junio C Hamano | 6d559fc | 2008-02-20 10:44:26 | [diff] [blame] | 702 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 703 | <div class="para"><p>The output of "git push" depends on the transport method used; this |
Junio C Hamano | 6d559fc | 2008-02-20 10:44:26 | [diff] [blame] | 704 | section describes the output when pushing over the git protocol (either |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 705 | locally or via ssh).</p></div> |
| 706 | <div class="para"><p>The status of the push is output in tabular form, with each line |
| 707 | representing the status of a single ref. Each line is of the form:</p></div> |
Junio C Hamano | 6d559fc | 2008-02-20 10:44:26 | [diff] [blame] | 708 | <div class="listingblock"> |
| 709 | <div class="content"> |
| 710 | <pre><tt> <flag> <summary> <from> -> <to> (<reason>)</tt></pre> |
| 711 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 712 | <div class="vlist"><dl> |
Junio C Hamano | 6d559fc | 2008-02-20 10:44:26 | [diff] [blame] | 713 | <dt> |
| 714 | flag |
| 715 | </dt> |
| 716 | <dd> |
| 717 | <p> |
| 718 | A single character indicating the status of the ref. This is |
| 719 | blank for a successfully pushed ref, <tt>!</tt> for a ref that was |
| 720 | rejected or failed to push, and <em>=</em> for a ref that was up to |
| 721 | date and did not need pushing (note that the status of up to |
| 722 | date refs is shown only when <tt>git push</tt> is running verbosely). |
| 723 | </p> |
| 724 | </dd> |
| 725 | <dt> |
| 726 | summary |
| 727 | </dt> |
| 728 | <dd> |
| 729 | <p> |
| 730 | For a successfully pushed ref, the summary shows the old and new |
| 731 | values of the ref in a form suitable for using as an argument to |
| 732 | <tt>git log</tt> (this is <tt><old>..<new></tt> in most cases, and |
| 733 | <tt><old>…<new></tt> for forced non-fast forward updates). For a |
| 734 | failed update, more details are given for the failure. |
| 735 | The string <tt>rejected</tt> indicates that git did not try to send the |
| 736 | ref at all (typically because it is not a fast forward). The |
| 737 | string <tt>remote rejected</tt> indicates that the remote end refused |
| 738 | the update; this rejection is typically caused by a hook on the |
| 739 | remote side. The string <tt>remote failure</tt> indicates that the |
| 740 | remote end did not report the successful update of the ref |
| 741 | (perhaps because of a temporary error on the remote side, a |
| 742 | break in the network connection, or other transient error). |
| 743 | </p> |
| 744 | </dd> |
| 745 | <dt> |
| 746 | from |
| 747 | </dt> |
| 748 | <dd> |
| 749 | <p> |
| 750 | The name of the local ref being pushed, minus its |
| 751 | <tt>refs/<type>/</tt> prefix. In the case of deletion, the |
| 752 | name of the local ref is omitted. |
| 753 | </p> |
| 754 | </dd> |
| 755 | <dt> |
| 756 | to |
| 757 | </dt> |
| 758 | <dd> |
| 759 | <p> |
| 760 | The name of the remote ref being updated, minus its |
| 761 | <tt>refs/<type>/</tt> prefix. |
| 762 | </p> |
| 763 | </dd> |
| 764 | <dt> |
| 765 | reason |
| 766 | </dt> |
| 767 | <dd> |
| 768 | <p> |
| 769 | A human-readable explanation. In the case of successfully pushed |
| 770 | refs, no explanation is needed. For a failed ref, the reason for |
| 771 | failure is described. |
| 772 | </p> |
| 773 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 774 | </dl></div> |
Junio C Hamano | 6d559fc | 2008-02-20 10:44:26 | [diff] [blame] | 775 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 776 | <h2 id="_examples">Examples</h2> |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 777 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 778 | <div class="vlist"><dl> |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 779 | <dt> |
| 780 | git push origin master |
| 781 | </dt> |
| 782 | <dd> |
| 783 | <p> |
| 784 | Find a ref that matches <tt>master</tt> in the source repository |
| 785 | (most likely, it would find <tt>refs/heads/master</tt>), and update |
| 786 | the same ref (e.g. <tt>refs/heads/master</tt>) in <tt>origin</tt> repository |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 787 | with it. If <tt>master</tt> did not exist remotely, it would be |
| 788 | created. |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 789 | </p> |
| 790 | </dd> |
| 791 | <dt> |
| 792 | git push origin :experimental |
| 793 | </dt> |
| 794 | <dd> |
| 795 | <p> |
| 796 | Find a ref that matches <tt>experimental</tt> in the <tt>origin</tt> repository |
| 797 | (e.g. <tt>refs/heads/experimental</tt>), and delete it. |
| 798 | </p> |
| 799 | </dd> |
| 800 | <dt> |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 801 | git push origin master:satellite/master dev:satellite/dev |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 802 | </dt> |
| 803 | <dd> |
| 804 | <p> |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 805 | Use the source ref that matches <tt>master</tt> (e.g. <tt>refs/heads/master</tt>) |
| 806 | to update the ref that matches <tt>satellite/master</tt> (most probably |
| 807 | <tt>refs/remotes/satellite/master</tt>) in the <tt>origin</tt> repository, then |
| 808 | do the same for <tt>dev</tt> and <tt>satellite/dev</tt>. |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 809 | </p> |
| 810 | </dd> |
Junio C Hamano | bfd4f9a | 2007-09-06 08:52:44 | [diff] [blame] | 811 | <dt> |
| 812 | git push origin master:refs/heads/experimental |
| 813 | </dt> |
| 814 | <dd> |
| 815 | <p> |
| 816 | Create the branch <tt>experimental</tt> in the <tt>origin</tt> repository |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 817 | by copying the current <tt>master</tt> branch. This form is only |
| 818 | needed to create a new branch or tag in the remote repository when |
| 819 | the local name and the remote name are different; otherwise, |
| 820 | the ref name on its own will work. |
Junio C Hamano | bfd4f9a | 2007-09-06 08:52:44 | [diff] [blame] | 821 | </p> |
| 822 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 823 | </dl></div> |
Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 824 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 825 | <h2 id="_author">Author</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 826 | <div class="sectionbody"> |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 827 | <div class="para"><p>Written by Junio C Hamano <gitster@pobox.com>, later rewritten in C |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 828 | by Linus Torvalds <torvalds@osdl.org></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 829 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 830 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 831 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 832 | <div class="para"><p>Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 833 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 834 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 835 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 836 | <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 837 | </div> |
| 838 | <div id="footer"> |
| 839 | <div id="footer-text"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame^] | 840 | Last updated 2008-11-14 08:26:10 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 841 | </div> |
| 842 | </div> |
| 843 | </body> |
| 844 | </html> |