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> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
| 6 | <meta name="generator" content="AsciiDoc 8.6.8" /> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 7 | <title>git-branch(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 37 | |
| 38 | em { |
| 39 | font-style: italic; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 40 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 45 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 46 | } |
| 47 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 55 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | padding-top: 0.5em; |
| 60 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 89 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 98 | |
| 99 | #author { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 100 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 101 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 102 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 103 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 104 | #email { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 105 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 106 | #revnumber, #revdate, #revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 107 | } |
| 108 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 109 | #footer { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 110 | font-size: small; |
| 111 | border-top: 2px solid silver; |
| 112 | padding-top: 0.5em; |
| 113 | margin-top: 4.0em; |
| 114 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 115 | #footer-text { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 116 | float: left; |
| 117 | padding-bottom: 0.5em; |
| 118 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 119 | #footer-badges { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 120 | float: right; |
| 121 | padding-bottom: 0.5em; |
| 122 | } |
| 123 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 124 | #preamble { |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 125 | margin-top: 1.5em; |
| 126 | margin-bottom: 1.5em; |
| 127 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 128 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 129 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 130 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 131 | margin-top: 1.0em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 132 | margin-bottom: 1.5em; |
| 133 | } |
| 134 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 135 | margin-top: 2.0em; |
| 136 | margin-bottom: 2.0em; |
| 137 | margin-right: 10%; |
| 138 | color: #606060; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | div.content { /* Block element content. */ |
| 142 | padding: 0; |
| 143 | } |
| 144 | |
| 145 | /* Block element titles. */ |
| 146 | div.title, caption.title { |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 147 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 148 | font-weight: bold; |
| 149 | text-align: left; |
| 150 | margin-top: 1.0em; |
| 151 | margin-bottom: 0.5em; |
| 152 | } |
| 153 | div.title + * { |
| 154 | margin-top: 0; |
| 155 | } |
| 156 | |
| 157 | td div.title:first-child { |
| 158 | margin-top: 0.0em; |
| 159 | } |
| 160 | div.content div.title:first-child { |
| 161 | margin-top: 0.0em; |
| 162 | } |
| 163 | div.content + div.title { |
| 164 | margin-top: 0.0em; |
| 165 | } |
| 166 | |
| 167 | div.sidebarblock > div.content { |
| 168 | background: #ffffee; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 169 | border: 1px solid #dddddd; |
| 170 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | padding: 0.5em; |
| 172 | } |
| 173 | |
| 174 | div.listingblock > div.content { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 175 | border: 1px solid #dddddd; |
| 176 | border-left: 5px solid #f0f0f0; |
| 177 | background: #f8f8f8; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 178 | padding: 0.5em; |
| 179 | } |
| 180 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 181 | div.quoteblock, div.verseblock { |
| 182 | padding-left: 1.0em; |
| 183 | margin-left: 1.0em; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 184 | margin-right: 10%; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 185 | border-left: 5px solid #f0f0f0; |
| 186 | color: #888; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 187 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 188 | |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 189 | div.quoteblock > div.attribution { |
| 190 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 191 | text-align: right; |
| 192 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 193 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 194 | div.verseblock > pre.content { |
| 195 | font-family: inherit; |
| 196 | font-size: inherit; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 197 | } |
| 198 | div.verseblock > div.attribution { |
| 199 | padding-top: 0.75em; |
| 200 | text-align: left; |
| 201 | } |
| 202 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 203 | div.verseblock + div.attribution { |
| 204 | text-align: left; |
| 205 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 206 | |
| 207 | div.admonitionblock .icon { |
| 208 | vertical-align: top; |
| 209 | font-size: 1.1em; |
| 210 | font-weight: bold; |
| 211 | text-decoration: underline; |
| 212 | color: #527bbd; |
| 213 | padding-right: 0.5em; |
| 214 | } |
| 215 | div.admonitionblock td.content { |
| 216 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 217 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 221 | border-left: 3px solid #dddddd; |
| 222 | padding-left: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 223 | } |
| 224 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 225 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 226 | span.image img { border-style: none; } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 227 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 228 | |
| 229 | dl { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| 233 | dt { |
| 234 | margin-top: 0.5em; |
| 235 | margin-bottom: 0; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 236 | font-style: normal; |
| 237 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 238 | } |
| 239 | dd > *:first-child { |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 240 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | ul, ol { |
| 244 | list-style-position: outside; |
| 245 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 246 | ol.arabic { |
| 247 | list-style-type: decimal; |
| 248 | } |
| 249 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 250 | list-style-type: lower-alpha; |
| 251 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 252 | ol.upperalpha { |
| 253 | list-style-type: upper-alpha; |
| 254 | } |
| 255 | ol.lowerroman { |
| 256 | list-style-type: lower-roman; |
| 257 | } |
| 258 | ol.upperroman { |
| 259 | list-style-type: upper-roman; |
| 260 | } |
| 261 | |
| 262 | div.compact ul, div.compact ol, |
| 263 | div.compact p, div.compact p, |
| 264 | div.compact div, div.compact div { |
| 265 | margin-top: 0.1em; |
| 266 | margin-bottom: 0.1em; |
| 267 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 268 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 269 | tfoot { |
| 270 | font-weight: bold; |
| 271 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 272 | td > div.verse { |
| 273 | white-space: pre; |
| 274 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 275 | |
| 276 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 277 | margin-top: 0.8em; |
| 278 | margin-bottom: 0.8em; |
| 279 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 280 | div.hdlist tr { |
| 281 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 282 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 283 | dt.hdlist1.strong, td.hdlist1.strong { |
| 284 | font-weight: bold; |
| 285 | } |
| 286 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 287 | vertical-align: top; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 288 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 289 | padding-right: 0.8em; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 290 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 291 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 292 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 293 | vertical-align: top; |
| 294 | } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 295 | div.hdlist.compact tr { |
| 296 | margin: 0; |
| 297 | padding-bottom: 0; |
| 298 | } |
| 299 | |
| 300 | .comment { |
| 301 | background: yellow; |
| 302 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 303 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 304 | .footnote, .footnoteref { |
| 305 | font-size: 0.8em; |
| 306 | } |
| 307 | |
| 308 | span.footnote, span.footnoteref { |
| 309 | vertical-align: super; |
| 310 | } |
| 311 | |
| 312 | #footnotes { |
| 313 | margin: 20px 0 20px 0; |
| 314 | padding: 7px 0 0 0; |
| 315 | } |
| 316 | |
| 317 | #footnotes div.footnote { |
| 318 | margin: 0 0 5px 0; |
| 319 | } |
| 320 | |
| 321 | #footnotes hr { |
| 322 | border: none; |
| 323 | border-top: 1px solid silver; |
| 324 | height: 1px; |
| 325 | text-align: left; |
| 326 | margin-left: 0; |
| 327 | width: 20%; |
| 328 | min-width: 100px; |
| 329 | } |
| 330 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 331 | div.colist td { |
| 332 | padding-right: 0.5em; |
| 333 | padding-bottom: 0.3em; |
| 334 | vertical-align: top; |
| 335 | } |
| 336 | div.colist td img { |
| 337 | margin-top: 0.3em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 338 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 340 | @media print { |
| 341 | #footer-badges { display: none; } |
| 342 | } |
| 343 | |
| 344 | #toc { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 345 | margin-bottom: 2.5em; |
| 346 | } |
| 347 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 348 | #toctitle { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 349 | color: #527bbd; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 350 | font-size: 1.1em; |
| 351 | font-weight: bold; |
| 352 | margin-top: 1.0em; |
| 353 | margin-bottom: 0.1em; |
| 354 | } |
| 355 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 356 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 357 | margin-top: 0; |
| 358 | margin-bottom: 0; |
| 359 | } |
| 360 | div.toclevel2 { |
| 361 | margin-left: 2em; |
| 362 | font-size: 0.9em; |
| 363 | } |
| 364 | div.toclevel3 { |
| 365 | margin-left: 4em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel4 { |
| 369 | margin-left: 6em; |
| 370 | font-size: 0.9em; |
| 371 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 372 | |
| 373 | span.aqua { color: aqua; } |
| 374 | span.black { color: black; } |
| 375 | span.blue { color: blue; } |
| 376 | span.fuchsia { color: fuchsia; } |
| 377 | span.gray { color: gray; } |
| 378 | span.green { color: green; } |
| 379 | span.lime { color: lime; } |
| 380 | span.maroon { color: maroon; } |
| 381 | span.navy { color: navy; } |
| 382 | span.olive { color: olive; } |
| 383 | span.purple { color: purple; } |
| 384 | span.red { color: red; } |
| 385 | span.silver { color: silver; } |
| 386 | span.teal { color: teal; } |
| 387 | span.white { color: white; } |
| 388 | span.yellow { color: yellow; } |
| 389 | |
| 390 | span.aqua-background { background: aqua; } |
| 391 | span.black-background { background: black; } |
| 392 | span.blue-background { background: blue; } |
| 393 | span.fuchsia-background { background: fuchsia; } |
| 394 | span.gray-background { background: gray; } |
| 395 | span.green-background { background: green; } |
| 396 | span.lime-background { background: lime; } |
| 397 | span.maroon-background { background: maroon; } |
| 398 | span.navy-background { background: navy; } |
| 399 | span.olive-background { background: olive; } |
| 400 | span.purple-background { background: purple; } |
| 401 | span.red-background { background: red; } |
| 402 | span.silver-background { background: silver; } |
| 403 | span.teal-background { background: teal; } |
| 404 | span.white-background { background: white; } |
| 405 | span.yellow-background { background: yellow; } |
| 406 | |
| 407 | span.big { font-size: 2em; } |
| 408 | span.small { font-size: 0.6em; } |
| 409 | |
| 410 | span.underline { text-decoration: underline; } |
| 411 | span.overline { text-decoration: overline; } |
| 412 | span.line-through { text-decoration: line-through; } |
| 413 | |
| 414 | div.unbreakable { page-break-inside: avoid; } |
| 415 | |
| 416 | |
| 417 | /* |
| 418 | * xhtml11 specific |
| 419 | * |
| 420 | * */ |
| 421 | |
| 422 | div.tableblock { |
| 423 | margin-top: 1.0em; |
| 424 | margin-bottom: 1.5em; |
| 425 | } |
| 426 | div.tableblock > table { |
| 427 | border: 3px solid #527bbd; |
| 428 | } |
| 429 | thead, p.table.header { |
| 430 | font-weight: bold; |
| 431 | color: #527bbd; |
| 432 | } |
| 433 | p.table { |
| 434 | margin-top: 0; |
| 435 | } |
| 436 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 437 | div.tableblock > table[frame="void"] { |
| 438 | border-style: none; |
| 439 | } |
| 440 | div.tableblock > table[frame="hsides"] { |
| 441 | border-left-style: none; |
| 442 | border-right-style: none; |
| 443 | } |
| 444 | div.tableblock > table[frame="vsides"] { |
| 445 | border-top-style: none; |
| 446 | border-bottom-style: none; |
| 447 | } |
| 448 | |
| 449 | |
| 450 | /* |
| 451 | * html5 specific |
| 452 | * |
| 453 | * */ |
| 454 | |
| 455 | table.tableblock { |
| 456 | margin-top: 1.0em; |
| 457 | margin-bottom: 1.5em; |
| 458 | } |
| 459 | thead, p.tableblock.header { |
| 460 | font-weight: bold; |
| 461 | color: #527bbd; |
| 462 | } |
| 463 | p.tableblock { |
| 464 | margin-top: 0; |
| 465 | } |
| 466 | table.tableblock { |
| 467 | border-width: 3px; |
| 468 | border-spacing: 0px; |
| 469 | border-style: solid; |
| 470 | border-color: #527bbd; |
| 471 | border-collapse: collapse; |
| 472 | } |
| 473 | th.tableblock, td.tableblock { |
| 474 | border-width: 1px; |
| 475 | padding: 4px; |
| 476 | border-style: solid; |
| 477 | border-color: #527bbd; |
| 478 | } |
| 479 | |
| 480 | table.tableblock.frame-topbot { |
| 481 | border-left-style: hidden; |
| 482 | border-right-style: hidden; |
| 483 | } |
| 484 | table.tableblock.frame-sides { |
| 485 | border-top-style: hidden; |
| 486 | border-bottom-style: hidden; |
| 487 | } |
| 488 | table.tableblock.frame-none { |
| 489 | border-style: hidden; |
| 490 | } |
| 491 | |
| 492 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 493 | text-align: left; |
| 494 | } |
| 495 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 496 | text-align: center; |
| 497 | } |
| 498 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 499 | text-align: right; |
| 500 | } |
| 501 | |
| 502 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 503 | vertical-align: top; |
| 504 | } |
| 505 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 506 | vertical-align: middle; |
| 507 | } |
| 508 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 509 | vertical-align: bottom; |
| 510 | } |
| 511 | |
| 512 | |
| 513 | /* |
| 514 | * manpage specific |
| 515 | * |
| 516 | * */ |
| 517 | |
| 518 | body.manpage h1 { |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 519 | padding-top: 0.5em; |
| 520 | padding-bottom: 0.5em; |
| 521 | border-top: 2px solid silver; |
| 522 | border-bottom: 2px solid silver; |
| 523 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 524 | body.manpage h2 { |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 525 | border-style: none; |
| 526 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 527 | body.manpage div.sectionbody { |
| 528 | margin-left: 3em; |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 529 | } |
| 530 | |
| 531 | @media print { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 532 | body.manpage div#toc { display: none; } |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 533 | } |
| 534 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 535 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 536 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 537 | <script type="text/javascript"> |
| 538 | /*<![CDATA[*/ |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 539 | var asciidoc = { // Namespace. |
| 540 | |
| 541 | ///////////////////////////////////////////////////////////////////// |
| 542 | // Table Of Contents generator |
| 543 | ///////////////////////////////////////////////////////////////////// |
| 544 | |
| 545 | /* Author: Mihai Bazon, September 2002 |
| 546 | * http://students.infoiasi.ro/~mishoo |
| 547 | * |
| 548 | * Table Of Content generator |
| 549 | * Version: 0.4 |
| 550 | * |
| 551 | * Feel free to use this script under the terms of the GNU General Public |
| 552 | * License, as long as you do not remove or alter this notice. |
| 553 | */ |
| 554 | |
| 555 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 556 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 557 | |
| 558 | // toclevels = 1..4. |
| 559 | toc: function (toclevels) { |
| 560 | |
| 561 | function getText(el) { |
| 562 | var text = ""; |
| 563 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 564 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 565 | text += i.data; |
| 566 | else if (i.firstChild != null) |
| 567 | text += getText(i); |
| 568 | } |
| 569 | return text; |
| 570 | } |
| 571 | |
| 572 | function TocEntry(el, text, toclevel) { |
| 573 | this.element = el; |
| 574 | this.text = text; |
| 575 | this.toclevel = toclevel; |
| 576 | } |
| 577 | |
| 578 | function tocEntries(el, toclevels) { |
| 579 | var result = new Array; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 580 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 581 | // Function that scans the DOM tree for header elements (the DOM2 |
| 582 | // nodeIterator API would be a better technique but not supported by all |
| 583 | // browsers). |
| 584 | var iterate = function (el) { |
| 585 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 586 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 587 | var mo = re.exec(i.tagName); |
| 588 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 589 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 590 | } |
| 591 | iterate(i); |
| 592 | } |
| 593 | } |
| 594 | } |
| 595 | iterate(el); |
| 596 | return result; |
| 597 | } |
| 598 | |
| 599 | var toc = document.getElementById("toc"); |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 600 | if (!toc) { |
| 601 | return; |
| 602 | } |
| 603 | |
| 604 | // Delete existing TOC entries in case we're reloading the TOC. |
| 605 | var tocEntriesToRemove = []; |
| 606 | var i; |
| 607 | for (i = 0; i < toc.childNodes.length; i++) { |
| 608 | var entry = toc.childNodes[i]; |
| 609 | if (entry.nodeName.toLowerCase() == 'div' |
| 610 | && entry.getAttribute("class") |
| 611 | && entry.getAttribute("class").match(/^toclevel/)) |
| 612 | tocEntriesToRemove.push(entry); |
| 613 | } |
| 614 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 615 | toc.removeChild(tocEntriesToRemove[i]); |
| 616 | } |
| 617 | |
| 618 | // Rebuild TOC entries. |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 619 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 620 | for (var i = 0; i < entries.length; ++i) { |
| 621 | var entry = entries[i]; |
| 622 | if (entry.element.id == "") |
| 623 | entry.element.id = "_toc_" + i; |
| 624 | var a = document.createElement("a"); |
| 625 | a.href = "#" + entry.element.id; |
| 626 | a.appendChild(document.createTextNode(entry.text)); |
| 627 | var div = document.createElement("div"); |
| 628 | div.appendChild(a); |
| 629 | div.className = "toclevel" + entry.toclevel; |
| 630 | toc.appendChild(div); |
| 631 | } |
| 632 | if (entries.length == 0) |
| 633 | toc.parentNode.removeChild(toc); |
| 634 | }, |
| 635 | |
| 636 | |
| 637 | ///////////////////////////////////////////////////////////////////// |
| 638 | // Footnotes generator |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | |
| 641 | /* Based on footnote generation code from: |
| 642 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 643 | */ |
| 644 | |
| 645 | footnotes: function () { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 646 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 647 | var i; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 648 | var noteholder = document.getElementById("footnotes"); |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 649 | if (!noteholder) { |
| 650 | return; |
| 651 | } |
| 652 | var entriesToRemove = []; |
| 653 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 654 | var entry = noteholder.childNodes[i]; |
| 655 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
| 656 | entriesToRemove.push(entry); |
| 657 | } |
| 658 | for (i = 0; i < entriesToRemove.length; i++) { |
| 659 | noteholder.removeChild(entriesToRemove[i]); |
| 660 | } |
| 661 | |
| 662 | // Rebuild footnote entries. |
| 663 | var cont = document.getElementById("content"); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 664 | var spans = cont.getElementsByTagName("span"); |
| 665 | var refs = {}; |
| 666 | var n = 0; |
| 667 | for (i=0; i<spans.length; i++) { |
| 668 | if (spans[i].className == "footnote") { |
| 669 | n++; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 670 | var note = spans[i].getAttribute("data-note"); |
| 671 | if (!note) { |
| 672 | // Use [\s\S] in place of . so multi-line matches work. |
| 673 | // Because JavaScript has no s (dotall) regex flag. |
| 674 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 675 | spans[i].innerHTML = |
| 676 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 677 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 678 | spans[i].setAttribute("data-note", note); |
| 679 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 680 | noteholder.innerHTML += |
| 681 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 682 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 683 | n + "</a>. " + note + "</div>"; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 684 | var id =spans[i].getAttribute("id"); |
| 685 | if (id != null) refs["#"+id] = n; |
| 686 | } |
| 687 | } |
| 688 | if (n == 0) |
| 689 | noteholder.parentNode.removeChild(noteholder); |
| 690 | else { |
| 691 | // Process footnoterefs. |
| 692 | for (i=0; i<spans.length; i++) { |
| 693 | if (spans[i].className == "footnoteref") { |
| 694 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 695 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 696 | n = refs[href]; |
| 697 | spans[i].innerHTML = |
| 698 | "[<a href='#_footnote_" + n + |
| 699 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 700 | } |
| 701 | } |
| 702 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 703 | }, |
| 704 | |
| 705 | install: function(toclevels) { |
| 706 | var timerId; |
| 707 | |
| 708 | function reinstall() { |
| 709 | asciidoc.footnotes(); |
| 710 | if (toclevels) { |
| 711 | asciidoc.toc(toclevels); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | function reinstallAndRemoveTimer() { |
| 716 | clearInterval(timerId); |
| 717 | reinstall(); |
| 718 | } |
| 719 | |
| 720 | timerId = setInterval(reinstall, 500); |
| 721 | if (document.addEventListener) |
| 722 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 723 | else |
| 724 | window.onload = reinstallAndRemoveTimer; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 725 | } |
| 726 | |
| 727 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 728 | asciidoc.install(); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 729 | /*]]>*/ |
| 730 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 731 | </head> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 732 | <body class="manpage"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 733 | <div id="header"> |
| 734 | <h1> |
| 735 | git-branch(1) Manual Page |
| 736 | </h1> |
| 737 | <h2>NAME</h2> |
| 738 | <div class="sectionbody"> |
| 739 | <p>git-branch - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 740 | List, create, or delete branches |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 741 | </p> |
| 742 | </div> |
| 743 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 744 | <div id="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 745 | <div class="sect1"> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 746 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 747 | <div class="sectionbody"> |
Junio C Hamano | 2b13527 | 2006-03-18 07:45:42 | [diff] [blame] | 748 | <div class="verseblock"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 749 | <pre class="content"><em>git branch</em> [--color[=<when>] | --no-color] [-r | -a] |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 750 | [--list] [-v [--abbrev=<length> | --no-abbrev]] |
Junio C Hamano | 22700fb | 2012-05-03 23:07:25 | [diff] [blame] | 751 | [--column[=<options>] | --no-column] |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 752 | [(--merged | --no-merged | --contains) [<commit>]] [<pattern>…] |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 753 | <em>git branch</em> [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>] |
Junio C Hamano | eccdd4a | 2012-09-10 23:28:17 | [diff] [blame] | 754 | <em>git branch</em> (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>] |
| 755 | <em>git branch</em> --unset-upstream [<branchname>] |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 756 | <em>git branch</em> (-m | -M) [<oldbranch>] <newbranch> |
Junio C Hamano | 515ab1d | 2011-12-09 23:41:20 | [diff] [blame] | 757 | <em>git branch</em> (-d | -D) [-r] <branchname>… |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 758 | <em>git branch</em> --edit-description [<branchname>]</pre> |
| 759 | <div class="attribution"> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 760 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 761 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 762 | </div> |
| 763 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 764 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 765 | <div class="sectionbody"> |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 766 | <div class="paragraph"><p>If <code>--list</code> is given, or if there are no non-option arguments, existing |
| 767 | branches are listed; the current branch will be highlighted with an |
| 768 | asterisk. Option <code>-r</code> causes the remote-tracking branches to be listed, |
| 769 | and option <code>-a</code> shows both local and remote branches. If a <code><pattern></code> |
| 770 | is given, it is used as a shell wildcard to restrict the output to |
| 771 | matching branches. If multiple patterns are given, a branch is shown if |
| 772 | it matches any of the patterns. Note that when providing a |
| 773 | <code><pattern></code>, you must use <code>--list</code>; otherwise the command is interpreted |
| 774 | as branch creation.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 775 | <div class="paragraph"><p>With <code>--contains</code>, shows only the branches that contain the named commit |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 776 | (in other words, the branches whose tip commits are descendants of the |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 777 | named commit). With <code>--merged</code>, only branches merged into the named |
Junio C Hamano | 38ddcce | 2008-07-15 15:49:03 | [diff] [blame] | 778 | commit (i.e. the branches whose tip commits are reachable from the named |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 779 | commit) will be listed. With <code>--no-merged</code> only branches not merged into |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 780 | the named commit will be listed. If the <commit> argument is missing it |
| 781 | defaults to <em>HEAD</em> (i.e. the tip of the current branch).</p></div> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 782 | <div class="paragraph"><p>The command’s second form creates a new branch head named <branchname> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 783 | which points to the current <em>HEAD</em>, or <start-point> if given.</p></div> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 784 | <div class="paragraph"><p>Note that this will create the new branch, but it will not switch the |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 785 | working tree to it; use "git checkout <newbranch>" to switch to the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 786 | new branch.</p></div> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 787 | <div class="paragraph"><p>When a local branch is started off a remote-tracking branch, Git sets up the |
Junio C Hamano | 79f4c7c | 2013-09-20 21:03:37 | [diff] [blame] | 788 | branch (specifically the <code>branch.<name>.remote</code> and <code>branch.<name>.merge</code> |
| 789 | configuration entries) so that <em>git pull</em> will appropriately merge from |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 790 | the remote-tracking branch. This behavior may be changed via the global |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 791 | <code>branch.autosetupmerge</code> configuration flag. That setting can be |
| 792 | overridden by using the <code>--track</code> and <code>--no-track</code> options, and |
| 793 | changed later using <code>git branch --set-upstream-to</code>.</p></div> |
| 794 | <div class="paragraph"><p>With a <code>-m</code> or <code>-M</code> option, <oldbranch> will be renamed to <newbranch>. |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 795 | If <oldbranch> had a corresponding reflog, it is renamed to match |
| 796 | <newbranch>, and a reflog entry is created to remember the branch |
| 797 | renaming. If <newbranch> exists, -M must be used to force the rename |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 798 | to happen.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 799 | <div class="paragraph"><p>With a <code>-d</code> or <code>-D</code> option, <code><branchname></code> will be deleted. You may |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 800 | specify more than one branch for deletion. If the branch currently |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 801 | has a reflog then the reflog will also be deleted.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 802 | <div class="paragraph"><p>Use <code>-r</code> together with <code>-d</code> to delete remote-tracking branches. Note, that it |
Junio C Hamano | 258e441 | 2007-11-29 02:28:32 | [diff] [blame] | 803 | only makes sense to delete remote-tracking branches if they no longer exist |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 804 | in the remote repository or if <em>git fetch</em> was configured not to fetch |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 805 | them again. See also the <em>prune</em> subcommand of <a href="git-remote.html">git-remote(1)</a> for a |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 806 | way to clean up all obsolete remote-tracking branches.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 807 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 808 | </div> |
| 809 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 810 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 811 | <div class="sectionbody"> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 812 | <div class="dlist"><dl> |
| 813 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 814 | -d |
| 815 | </dt> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 816 | <dt class="hdlist1"> |
| 817 | --delete |
| 818 | </dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 819 | <dd> |
| 820 | <p> |
Junio C Hamano | d965706 | 2010-04-18 00:01:03 | [diff] [blame] | 821 | Delete a branch. The branch must be fully merged in its |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 822 | upstream branch, or in <code>HEAD</code> if no upstream was set with |
| 823 | <code>--track</code> or <code>--set-upstream</code>. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 824 | </p> |
| 825 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 826 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 827 | -D |
| 828 | </dt> |
| 829 | <dd> |
| 830 | <p> |
Junio C Hamano | 258e441 | 2007-11-29 02:28:32 | [diff] [blame] | 831 | Delete a branch irrespective of its merged status. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 832 | </p> |
| 833 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 834 | <dt class="hdlist1"> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 835 | -l |
| 836 | </dt> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 837 | <dt class="hdlist1"> |
| 838 | --create-reflog |
| 839 | </dt> |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 840 | <dd> |
| 841 | <p> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 842 | Create the branch’s reflog. This activates recording of |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 843 | all changes made to the branch ref, enabling use of date |
| 844 | based sha1 expressions such as "<branchname>@{yesterday}". |
Junio C Hamano | e749562 | 2010-04-09 07:18:35 | [diff] [blame] | 845 | Note that in non-bare repositories, reflogs are usually |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 846 | enabled by default by the <code>core.logallrefupdates</code> config option. |
Junio C Hamano | 341071d | 2006-06-04 07:24:48 | [diff] [blame] | 847 | </p> |
| 848 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 849 | <dt class="hdlist1"> |
Junio C Hamano | 560a1f6 | 2006-01-30 04:19:57 | [diff] [blame] | 850 | -f |
| 851 | </dt> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 852 | <dt class="hdlist1"> |
Junio C Hamano | 68cfa3a | 2009-08-30 00:22:55 | [diff] [blame] | 853 | --force |
| 854 | </dt> |
Junio C Hamano | 560a1f6 | 2006-01-30 04:19:57 | [diff] [blame] | 855 | <dd> |
| 856 | <p> |
Junio C Hamano | ea82cff | 2009-03-18 01:54:48 | [diff] [blame] | 857 | Reset <branchname> to <startpoint> if <branchname> exists |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 858 | already. Without <code>-f</code> <em>git branch</em> refuses to change an existing branch. |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 859 | </p> |
| 860 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 861 | <dt class="hdlist1"> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 862 | -m |
| 863 | </dt> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 864 | <dt class="hdlist1"> |
| 865 | --move |
| 866 | </dt> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 867 | <dd> |
| 868 | <p> |
| 869 | Move/rename a branch and the corresponding reflog. |
| 870 | </p> |
| 871 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 872 | <dt class="hdlist1"> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 873 | -M |
| 874 | </dt> |
| 875 | <dd> |
| 876 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 877 | Move/rename a branch even if the new branch name already exists. |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 878 | </p> |
| 879 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 880 | <dt class="hdlist1"> |
Junio C Hamano | 4aa0bcc | 2010-03-03 05:13:12 | [diff] [blame] | 881 | --color[=<when>] |
Junio C Hamano | eb69295 | 2007-01-03 22:02:12 | [diff] [blame] | 882 | </dt> |
| 883 | <dd> |
| 884 | <p> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 885 | Color branches to highlight current, local, and |
| 886 | remote-tracking branches. |
Junio C Hamano | 4aa0bcc | 2010-03-03 05:13:12 | [diff] [blame] | 887 | The value must be always (the default), never, or auto. |
Junio C Hamano | eb69295 | 2007-01-03 22:02:12 | [diff] [blame] | 888 | </p> |
| 889 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 890 | <dt class="hdlist1"> |
Junio C Hamano | eb69295 | 2007-01-03 22:02:12 | [diff] [blame] | 891 | --no-color |
| 892 | </dt> |
| 893 | <dd> |
| 894 | <p> |
| 895 | Turn off branch colors, even when the configuration file gives the |
| 896 | default to color output. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 897 | Same as <code>--color=never</code>. |
Junio C Hamano | eb69295 | 2007-01-03 22:02:12 | [diff] [blame] | 898 | </p> |
| 899 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 900 | <dt class="hdlist1"> |
Junio C Hamano | 22700fb | 2012-05-03 23:07:25 | [diff] [blame] | 901 | --column[=<options>] |
| 902 | </dt> |
| 903 | <dt class="hdlist1"> |
| 904 | --no-column |
| 905 | </dt> |
| 906 | <dd> |
| 907 | <p> |
| 908 | Display branch listing in columns. See configuration variable |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 909 | column.branch for option syntax.<code>--column</code> and <code>--no-column</code> |
Junio C Hamano | 22700fb | 2012-05-03 23:07:25 | [diff] [blame] | 910 | without options are equivalent to <em>always</em> and <em>never</em> respectively. |
| 911 | </p> |
| 912 | <div class="paragraph"><p>This option is only applicable in non-verbose mode.</p></div> |
| 913 | </dd> |
| 914 | <dt class="hdlist1"> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 915 | -r |
| 916 | </dt> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 917 | <dt class="hdlist1"> |
| 918 | --remotes |
| 919 | </dt> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 920 | <dd> |
| 921 | <p> |
Junio C Hamano | 63ef0ac | 2006-12-22 07:28:18 | [diff] [blame] | 922 | List or delete (if used with -d) the remote-tracking branches. |
Junio C Hamano | fe9acab | 2006-11-24 12:10:55 | [diff] [blame] | 923 | </p> |
| 924 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 925 | <dt class="hdlist1"> |
Junio C Hamano | fe9acab | 2006-11-24 12:10:55 | [diff] [blame] | 926 | -a |
| 927 | </dt> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 928 | <dt class="hdlist1"> |
| 929 | --all |
| 930 | </dt> |
Junio C Hamano | fe9acab | 2006-11-24 12:10:55 | [diff] [blame] | 931 | <dd> |
| 932 | <p> |
| 933 | List both remote-tracking branches and local branches. |
Junio C Hamano | 560a1f6 | 2006-01-30 04:19:57 | [diff] [blame] | 934 | </p> |
| 935 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 936 | <dt class="hdlist1"> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 937 | --list |
| 938 | </dt> |
| 939 | <dd> |
| 940 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 941 | Activate the list mode. <code>git branch <pattern></code> would try to create a branch, |
| 942 | use <code>git branch --list <pattern></code> to list matching branches. |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 943 | </p> |
| 944 | </dd> |
| 945 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 946 | -v |
| 947 | </dt> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 948 | <dt class="hdlist1"> |
Junio C Hamano | 4f07aec | 2012-09-25 19:08:44 | [diff] [blame] | 949 | -vv |
| 950 | </dt> |
| 951 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 952 | --verbose |
Junio C Hamano | 53edd07 | 2006-11-25 10:05:21 | [diff] [blame] | 953 | </dt> |
| 954 | <dd> |
| 955 | <p> |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 956 | When in list mode, |
| 957 | show sha1 and commit subject line for each head, along with |
Junio C Hamano | 98e32c3 | 2009-04-13 02:39:53 | [diff] [blame] | 958 | relationship to upstream branch (if any). If given twice, print |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 959 | the name of the upstream branch, as well (see also <code>git remote |
| 960 | show <remote></code>). |
Junio C Hamano | 53edd07 | 2006-11-25 10:05:21 | [diff] [blame] | 961 | </p> |
| 962 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 963 | <dt class="hdlist1"> |
Junio C Hamano | 51f87de | 2012-04-16 21:18:54 | [diff] [blame] | 964 | -q |
| 965 | </dt> |
| 966 | <dt class="hdlist1"> |
| 967 | --quiet |
| 968 | </dt> |
| 969 | <dd> |
| 970 | <p> |
| 971 | Be more quiet when creating or deleting a branch, suppressing |
| 972 | non-error messages. |
| 973 | </p> |
| 974 | </dd> |
| 975 | <dt class="hdlist1"> |
Junio C Hamano | 53edd07 | 2006-11-25 10:05:21 | [diff] [blame] | 976 | --abbrev=<length> |
| 977 | </dt> |
| 978 | <dd> |
| 979 | <p> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 980 | Alter the sha1’s minimum display length in the output listing. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 981 | The default value is 7 and can be overridden by the <code>core.abbrev</code> |
Junio C Hamano | 6e41cb3 | 2011-08-29 07:12:49 | [diff] [blame] | 982 | config option. |
Junio C Hamano | 53edd07 | 2006-11-25 10:05:21 | [diff] [blame] | 983 | </p> |
| 984 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 985 | <dt class="hdlist1"> |
Junio C Hamano | a3fccdf | 2007-03-03 05:18:26 | [diff] [blame] | 986 | --no-abbrev |
| 987 | </dt> |
| 988 | <dd> |
| 989 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 990 | Display the full sha1s in the output listing rather than abbreviating them. |
Junio C Hamano | a3fccdf | 2007-03-03 05:18:26 | [diff] [blame] | 991 | </p> |
| 992 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 993 | <dt class="hdlist1"> |
Junio C Hamano | 89bdb3b | 2009-05-10 06:48:14 | [diff] [blame] | 994 | -t |
| 995 | </dt> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 996 | <dt class="hdlist1"> |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 997 | --track |
| 998 | </dt> |
| 999 | <dd> |
| 1000 | <p> |
Junio C Hamano | 79f4c7c | 2013-09-20 21:03:37 | [diff] [blame] | 1001 | When creating a new branch, set up <code>branch.<name>.remote</code> and |
| 1002 | <code>branch.<name>.merge</code> configuration entries to mark the |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 1003 | start-point branch as "upstream" from the new branch. This |
| 1004 | configuration will tell git to show the relationship between the |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1005 | two branches in <code>git status</code> and <code>git branch -v</code>. Furthermore, |
| 1006 | it directs <code>git pull</code> without arguments to pull from the |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 1007 | upstream when the new branch is checked out. |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 1008 | </p> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1009 | <div class="paragraph"><p>This behavior is the default when the start point is a remote-tracking branch. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1010 | Set the branch.autosetupmerge configuration variable to <code>false</code> if you |
| 1011 | want <code>git checkout</code> and <code>git branch</code> to always behave as if <em>--no-track</em> |
| 1012 | were given. Set it to <code>always</code> if you want this behavior when the |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1013 | start-point is either a local or remote-tracking branch.</p></div> |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 1014 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1015 | <dt class="hdlist1"> |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 1016 | --no-track |
| 1017 | </dt> |
| 1018 | <dd> |
| 1019 | <p> |
Junio C Hamano | 3bd66e9 | 2009-04-18 06:17:56 | [diff] [blame] | 1020 | Do not set up "upstream" configuration, even if the |
| 1021 | branch.autosetupmerge configuration variable is true. |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 1022 | </p> |
| 1023 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1024 | <dt class="hdlist1"> |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 1025 | --set-upstream |
| 1026 | </dt> |
| 1027 | <dd> |
| 1028 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1029 | If specified branch does not exist yet or if <code>--force</code> has been |
| 1030 | given, acts exactly like <code>--track</code>. Otherwise sets up configuration |
| 1031 | like <code>--track</code> would when creating the branch, except that where |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 1032 | branch points to is not changed. |
| 1033 | </p> |
| 1034 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1035 | <dt class="hdlist1"> |
Junio C Hamano | eccdd4a | 2012-09-10 23:28:17 | [diff] [blame] | 1036 | -u <upstream> |
| 1037 | </dt> |
| 1038 | <dt class="hdlist1"> |
| 1039 | --set-upstream-to=<upstream> |
| 1040 | </dt> |
| 1041 | <dd> |
| 1042 | <p> |
| 1043 | Set up <branchname>'s tracking information so <upstream> is |
| 1044 | considered <branchname>'s upstream branch. If no <branchname> |
| 1045 | is specified, then it defaults to the current branch. |
| 1046 | </p> |
| 1047 | </dd> |
| 1048 | <dt class="hdlist1"> |
| 1049 | --unset-upstream |
| 1050 | </dt> |
| 1051 | <dd> |
| 1052 | <p> |
| 1053 | Remove the upstream information for <branchname>. If no branch |
| 1054 | is specified it defaults to the current branch. |
| 1055 | </p> |
| 1056 | </dd> |
| 1057 | <dt class="hdlist1"> |
Junio C Hamano | 515ab1d | 2011-12-09 23:41:20 | [diff] [blame] | 1058 | --edit-description |
| 1059 | </dt> |
| 1060 | <dd> |
| 1061 | <p> |
| 1062 | Open an editor and edit the text to explain what the branch is |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1063 | for, to be used by various other commands (e.g. <code>request-pull</code>). |
Junio C Hamano | 515ab1d | 2011-12-09 23:41:20 | [diff] [blame] | 1064 | </p> |
| 1065 | </dd> |
| 1066 | <dt class="hdlist1"> |
Junio C Hamano | cae88e2 | 2012-03-09 00:13:20 | [diff] [blame] | 1067 | --contains [<commit>] |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1068 | </dt> |
| 1069 | <dd> |
| 1070 | <p> |
Junio C Hamano | cae88e2 | 2012-03-09 00:13:20 | [diff] [blame] | 1071 | Only list branches which contain the specified commit (HEAD |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1072 | if not specified). Implies <code>--list</code>. |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1073 | </p> |
| 1074 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1075 | <dt class="hdlist1"> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1076 | --merged [<commit>] |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1077 | </dt> |
| 1078 | <dd> |
| 1079 | <p> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1080 | Only list branches whose tips are reachable from the |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1081 | specified commit (HEAD if not specified). Implies <code>--list</code>. |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1082 | </p> |
| 1083 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1084 | <dt class="hdlist1"> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1085 | --no-merged [<commit>] |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1086 | </dt> |
| 1087 | <dd> |
| 1088 | <p> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1089 | Only list branches whose tips are not reachable from the |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1090 | specified commit (HEAD if not specified). Implies <code>--list</code>. |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1091 | </p> |
| 1092 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1093 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1094 | <branchname> |
| 1095 | </dt> |
| 1096 | <dd> |
| 1097 | <p> |
| 1098 | The name of the branch to create or delete. |
Junio C Hamano | b2f5edd | 2006-05-21 10:50:09 | [diff] [blame] | 1099 | The new branch name must pass all checks defined by |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1100 | <a href="git-check-ref-format.html">git-check-ref-format(1)</a>. Some of these checks |
Junio C Hamano | b2f5edd | 2006-05-21 10:50:09 | [diff] [blame] | 1101 | may restrict the characters allowed in a branch name. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1102 | </p> |
| 1103 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1104 | <dt class="hdlist1"> |
Junio C Hamano | 560a1f6 | 2006-01-30 04:19:57 | [diff] [blame] | 1105 | <start-point> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1106 | </dt> |
| 1107 | <dd> |
| 1108 | <p> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1109 | The new branch head will point to this commit. It may be |
| 1110 | given as a branch name, a commit-id, or a tag. If this |
| 1111 | option is omitted, the current HEAD will be used instead. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1112 | </p> |
| 1113 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1114 | <dt class="hdlist1"> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1115 | <oldbranch> |
| 1116 | </dt> |
| 1117 | <dd> |
| 1118 | <p> |
| 1119 | The name of an existing branch to rename. |
| 1120 | </p> |
| 1121 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1122 | <dt class="hdlist1"> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1123 | <newbranch> |
| 1124 | </dt> |
| 1125 | <dd> |
| 1126 | <p> |
| 1127 | The new name for an existing branch. The same restrictions as for |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1128 | <branchname> apply. |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1129 | </p> |
| 1130 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1131 | </dl></div> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1132 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1133 | </div> |
| 1134 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1135 | <h2 id="_examples">Examples</h2> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1136 | <div class="sectionbody"> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1137 | <div class="dlist"><dl> |
| 1138 | <dt class="hdlist1"> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1139 | Start development from a known tag |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1140 | </dt> |
| 1141 | <dd> |
| 1142 | <div class="listingblock"> |
| 1143 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1144 | <pre><code>$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6 |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1145 | $ cd my2.6 |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1146 | $ git branch my2.6.14 v2.6.14 <b><1></b> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1147 | $ git checkout my2.6.14</code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1148 | </div></div> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1149 | <div class="colist arabic"><ol> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1150 | <li> |
| 1151 | <p> |
| 1152 | This step and the next one could be combined into a single step with |
| 1153 | "checkout -b my2.6.14 v2.6.14". |
| 1154 | </p> |
| 1155 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1156 | </ol></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1157 | </dd> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1158 | <dt class="hdlist1"> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1159 | Delete an unneeded branch |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1160 | </dt> |
| 1161 | <dd> |
| 1162 | <div class="listingblock"> |
| 1163 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1164 | <pre><code>$ git clone git://git.kernel.org/.../git.git my.git |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1165 | $ cd my.git |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1166 | $ git branch -d -r origin/todo origin/html origin/man <b><1></b> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1167 | $ git branch -D test <b><2></b></code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1168 | </div></div> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1169 | <div class="colist arabic"><ol> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1170 | <li> |
| 1171 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1172 | Delete the remote-tracking branches "todo", "html" and "man". The next |
| 1173 | <em>fetch</em> or <em>pull</em> will create them again unless you configure them not to. |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1174 | See <a href="git-fetch.html">git-fetch(1)</a>. |
Junio C Hamano | 63ef0ac | 2006-12-22 07:28:18 | [diff] [blame] | 1175 | </p> |
| 1176 | </li> |
| 1177 | <li> |
| 1178 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1179 | Delete the "test" branch even if the "master" branch (or whichever branch |
| 1180 | is currently checked out) does not have all commits from the test branch. |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1181 | </p> |
| 1182 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1183 | </ol></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1184 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1185 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1186 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1187 | </div> |
| 1188 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1189 | <h2 id="_notes">Notes</h2> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1190 | <div class="sectionbody"> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1191 | <div class="paragraph"><p>If you are creating a branch that you want to checkout immediately, it is |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1192 | easier to use the git checkout command with its <code>-b</code> option to create |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1193 | a branch and check it out with a single command.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1194 | <div class="paragraph"><p>The options <code>--contains</code>, <code>--merged</code> and <code>--no-merged</code> serve three related |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1195 | but different purposes:</p></div> |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1196 | <div class="ulist"><ul> |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1197 | <li> |
| 1198 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1199 | <code>--contains <commit></code> is used to find all branches which will need |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1200 | special attention if <commit> were to be rebased or amended, since those |
| 1201 | branches contain the specified <commit>. |
| 1202 | </p> |
| 1203 | </li> |
| 1204 | <li> |
| 1205 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1206 | <code>--merged</code> is used to find all branches which can be safely deleted, |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1207 | since those branches are fully contained by HEAD. |
| 1208 | </p> |
| 1209 | </li> |
| 1210 | <li> |
| 1211 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1212 | <code>--no-merged</code> is used to find branches which are candidates for merging |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1213 | into HEAD, since those branches are not fully contained by HEAD. |
| 1214 | </p> |
| 1215 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1216 | </ul></div> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 1217 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1218 | </div> |
| 1219 | <div class="sect1"> |
Junio C Hamano | c276ec7 | 2009-08-26 01:35:22 | [diff] [blame] | 1220 | <h2 id="_see_also">SEE ALSO</h2> |
| 1221 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1222 | <div class="paragraph"><p><a href="git-check-ref-format.html">git-check-ref-format(1)</a>, |
| 1223 | <a href="git-fetch.html">git-fetch(1)</a>, |
| 1224 | <a href="git-remote.html">git-remote(1)</a>, |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1225 | <a href="user-manual.html#what-is-a-branch">“Understanding history: What is |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1226 | a branch?”</a> in the Git User’s Manual.</p></div> |
Junio C Hamano | c276ec7 | 2009-08-26 01:35:22 | [diff] [blame] | 1227 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1228 | </div> |
| 1229 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1230 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1231 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1232 | <div class="paragraph"><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] | 1233 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1234 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1235 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1236 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1237 | <div id="footer"> |
| 1238 | <div id="footer-text"> |
Junio C Hamano | 79f4c7c | 2013-09-20 21:03:37 | [diff] [blame] | 1239 | Last updated 2013-09-20 14:03:14 PDT |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1240 | </div> |
| 1241 | </div> |
| 1242 | </body> |
| 1243 | </html> |