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 | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 7 | <title>git-commit(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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 272 | td > div.verse { |
| 273 | white-space: pre; |
| 274 | } |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 290 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 291 | } |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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 | 6018664 | 2010-12-02 14:18:26 | [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-commit(1) Manual Page |
| 736 | </h1> |
| 737 | <h2>NAME</h2> |
| 738 | <div class="sectionbody"> |
| 739 | <p>git-commit - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 740 | Record changes to the repository |
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 | 6018664 | 2010-12-02 14:18:26 | [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 | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 748 | <div class="verseblock"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 749 | <pre class="content"><em>git commit</em> [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] |
Junio C Hamano | 3d050d6 | 2011-05-17 06:43:34 | [diff] [blame] | 750 | [--dry-run] [(-c | -C | --fixup | --squash) <commit>] |
| 751 | [-F <file> | -m <msg>] [--reset-author] [--allow-empty] |
| 752 | [--allow-empty-message] [--no-verify] [-e] [--author=<author>] |
| 753 | [--date=<date>] [--cleanup=<mode>] [--status | --no-status] |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 754 | [-i | -o] [-S[<keyid>]] [--] [<file>…]</pre> |
| 755 | <div class="attribution"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 756 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 757 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 758 | </div> |
| 759 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 760 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 761 | <div class="sectionbody"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 762 | <div class="paragraph"><p>Stores the current contents of the index in a new commit along |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 763 | with a log message from the user describing the changes.</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 764 | <div class="paragraph"><p>The content to be added can be specified in several ways:</p></div> |
| 765 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 766 | <li> |
| 767 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 768 | by using <em>git add</em> to incrementally "add" changes to the |
Junio C Hamano | b515b6a | 2007-08-08 09:21:16 | [diff] [blame] | 769 | index before using the <em>commit</em> command (Note: even modified |
| 770 | files must be "added"); |
| 771 | </p> |
| 772 | </li> |
| 773 | <li> |
| 774 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 775 | by using <em>git rm</em> to remove files from the working tree |
Junio C Hamano | bd2b4bb | 2007-08-06 06:42:24 | [diff] [blame] | 776 | and the index, again before using the <em>commit</em> command; |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 777 | </p> |
| 778 | </li> |
| 779 | <li> |
| 780 | <p> |
Junio C Hamano | bd2b4bb | 2007-08-06 06:42:24 | [diff] [blame] | 781 | by listing files as arguments to the <em>commit</em> command, in which |
| 782 | case the commit will ignore changes staged in the index, and instead |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 783 | record the current content of the listed files (which must already |
| 784 | be known to git); |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 785 | </p> |
| 786 | </li> |
| 787 | <li> |
| 788 | <p> |
Junio C Hamano | bd2b4bb | 2007-08-06 06:42:24 | [diff] [blame] | 789 | by using the -a switch with the <em>commit</em> command to automatically |
| 790 | "add" changes from all known files (i.e. all files that are already |
| 791 | listed in the index) and to automatically "rm" files in the index |
| 792 | that have been removed from the working tree, and then perform the |
| 793 | actual commit; |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 794 | </p> |
| 795 | </li> |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 796 | <li> |
| 797 | <p> |
Junio C Hamano | 3d050d6 | 2011-05-17 06:43:34 | [diff] [blame] | 798 | by using the --interactive or --patch switches with the <em>commit</em> command |
| 799 | to decide one by one which files or hunks should be part of the commit, |
Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 800 | before finalizing the operation. See the “Interactive Mode” section of |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 801 | <a href="git-add.html">git-add(1)</a> to learn how to operate these modes. |
Junio C Hamano | c51fede | 2007-03-12 07:29:20 | [diff] [blame] | 802 | </p> |
| 803 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 804 | </ol></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 805 | <div class="paragraph"><p>The <code>--dry-run</code> option can be used to obtain a |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 806 | summary of what is included by any of the above for the next |
Junio C Hamano | 1bb3199 | 2009-08-29 04:24:08 | [diff] [blame] | 807 | commit by giving the same set of parameters (options and paths).</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 808 | <div class="paragraph"><p>If you make a commit and then find a mistake immediately after |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 809 | that, you can recover from it with <em>git reset</em>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 810 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 811 | </div> |
| 812 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 813 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 814 | <div class="sectionbody"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 815 | <div class="dlist"><dl> |
| 816 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 817 | -a |
| 818 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 819 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 820 | --all |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 821 | </dt> |
| 822 | <dd> |
| 823 | <p> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 824 | Tell the command to automatically stage files that have |
| 825 | been modified and deleted, but new files you have not |
| 826 | told git about are not affected. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 827 | </p> |
| 828 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 829 | <dt class="hdlist1"> |
Junio C Hamano | 3d050d6 | 2011-05-17 06:43:34 | [diff] [blame] | 830 | -p |
| 831 | </dt> |
| 832 | <dt class="hdlist1"> |
| 833 | --patch |
| 834 | </dt> |
| 835 | <dd> |
| 836 | <p> |
| 837 | Use the interactive patch selection interface to chose |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 838 | which changes to commit. See <a href="git-add.html">git-add(1)</a> for |
Junio C Hamano | 3d050d6 | 2011-05-17 06:43:34 | [diff] [blame] | 839 | details. |
| 840 | </p> |
| 841 | </dd> |
| 842 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 843 | -C <commit> |
| 844 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 845 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 846 | --reuse-message=<commit> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 847 | </dt> |
| 848 | <dd> |
| 849 | <p> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 850 | Take an existing commit object, and reuse the log message |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 851 | and the authorship information (including the timestamp) |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 852 | when creating the commit. |
| 853 | </p> |
| 854 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 855 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 856 | -c <commit> |
| 857 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 858 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 859 | --reedit-message=<commit> |
| 860 | </dt> |
| 861 | <dd> |
| 862 | <p> |
| 863 | Like <em>-C</em>, but with <em>-c</em> the editor is invoked, so that |
| 864 | the user can further edit the commit message. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 865 | </p> |
| 866 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 867 | <dt class="hdlist1"> |
Junio C Hamano | 2e6ded8 | 2010-12-05 06:20:48 | [diff] [blame] | 868 | --fixup=<commit> |
| 869 | </dt> |
| 870 | <dd> |
| 871 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 872 | Construct a commit message for use with <code>rebase --autosquash</code>. |
Junio C Hamano | 2e6ded8 | 2010-12-05 06:20:48 | [diff] [blame] | 873 | The commit message will be the subject line from the specified |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 874 | commit with a prefix of "fixup! ". See <a href="git-rebase.html">git-rebase(1)</a> |
Junio C Hamano | 2e6ded8 | 2010-12-05 06:20:48 | [diff] [blame] | 875 | for details. |
| 876 | </p> |
| 877 | </dd> |
| 878 | <dt class="hdlist1"> |
| 879 | --squash=<commit> |
| 880 | </dt> |
| 881 | <dd> |
| 882 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 883 | Construct a commit message for use with <code>rebase --autosquash</code>. |
Junio C Hamano | 2e6ded8 | 2010-12-05 06:20:48 | [diff] [blame] | 884 | The commit message subject line is taken from the specified |
| 885 | commit with a prefix of "squash! ". Can be used with additional |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 886 | commit message options (<code>-m</code>/<code>-c</code>/<code>-C</code>/<code>-F</code>). See |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 887 | <a href="git-rebase.html">git-rebase(1)</a> for details. |
Junio C Hamano | 2e6ded8 | 2010-12-05 06:20:48 | [diff] [blame] | 888 | </p> |
| 889 | </dd> |
| 890 | <dt class="hdlist1"> |
Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 891 | --reset-author |
| 892 | </dt> |
| 893 | <dd> |
| 894 | <p> |
Junio C Hamano | a8cc1d8 | 2011-03-10 01:18:12 | [diff] [blame] | 895 | When used with -C/-c/--amend options, or when committing after a |
| 896 | a conflicting cherry-pick, declare that the authorship of the |
| 897 | resulting commit now belongs of the committer. This also renews |
| 898 | the author timestamp. |
Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 899 | </p> |
| 900 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 901 | <dt class="hdlist1"> |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 902 | --short |
| 903 | </dt> |
| 904 | <dd> |
| 905 | <p> |
| 906 | When doing a dry-run, give the output in the short-format. See |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 907 | <a href="git-status.html">git-status(1)</a> for details. Implies <code>--dry-run</code>. |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 908 | </p> |
| 909 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 910 | <dt class="hdlist1"> |
Junio C Hamano | 9257a33 | 2012-06-25 20:01:02 | [diff] [blame] | 911 | --branch |
| 912 | </dt> |
| 913 | <dd> |
| 914 | <p> |
| 915 | Show the branch and tracking info even in short-format. |
| 916 | </p> |
| 917 | </dd> |
| 918 | <dt class="hdlist1"> |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 919 | --porcelain |
| 920 | </dt> |
| 921 | <dd> |
| 922 | <p> |
| 923 | When doing a dry-run, give the output in a porcelain-ready |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 924 | format. See <a href="git-status.html">git-status(1)</a> for details. Implies |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 925 | <code>--dry-run</code>. |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 926 | </p> |
| 927 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 928 | <dt class="hdlist1"> |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 929 | --long |
| 930 | </dt> |
| 931 | <dd> |
| 932 | <p> |
| 933 | When doing a dry-run, give the output in a the long-format. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 934 | Implies <code>--dry-run</code>. |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 935 | </p> |
| 936 | </dd> |
| 937 | <dt class="hdlist1"> |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 938 | -z |
| 939 | </dt> |
Junio C Hamano | 9257a33 | 2012-06-25 20:01:02 | [diff] [blame] | 940 | <dt class="hdlist1"> |
| 941 | --null |
| 942 | </dt> |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 943 | <dd> |
| 944 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 945 | When showing <code>short</code> or <code>porcelain</code> status output, terminate |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 946 | entries in the status output with NUL, instead of LF. If no |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 947 | format is given, implies the <code>--porcelain</code> output format. |
Junio C Hamano | a0fae26 | 2009-12-28 09:33:50 | [diff] [blame] | 948 | </p> |
| 949 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 950 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 951 | -F <file> |
| 952 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 953 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 954 | --file=<file> |
| 955 | </dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 956 | <dd> |
| 957 | <p> |
| 958 | Take the commit message from the given file. Use <em>-</em> to |
| 959 | read the message from the standard input. |
| 960 | </p> |
| 961 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 962 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 963 | --author=<author> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 964 | </dt> |
| 965 | <dd> |
| 966 | <p> |
Junio C Hamano | 13002fb | 2010-06-08 05:53:58 | [diff] [blame] | 967 | Override the commit author. Specify an explicit author using the |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 968 | standard <code>A U Thor <author@example.com></code> format. Otherwise <author> |
Junio C Hamano | 13002fb | 2010-06-08 05:53:58 | [diff] [blame] | 969 | is assumed to be a pattern and is used to search for an existing |
| 970 | commit by that author (i.e. rev-list --all -i --author=<author>); |
| 971 | the commit author is then copied from the first such commit found. |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 972 | </p> |
| 973 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 974 | <dt class="hdlist1"> |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 975 | --date=<date> |
| 976 | </dt> |
| 977 | <dd> |
| 978 | <p> |
| 979 | Override the author date used in the commit. |
| 980 | </p> |
| 981 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 982 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 983 | -m <msg> |
| 984 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 985 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 986 | --message=<msg> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 987 | </dt> |
| 988 | <dd> |
| 989 | <p> |
| 990 | Use the given <msg> as the commit message. |
| 991 | </p> |
| 992 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 993 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 994 | -t <file> |
| 995 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 996 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 997 | --template=<file> |
Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 998 | </dt> |
| 999 | <dd> |
| 1000 | <p> |
Junio C Hamano | 51f87de | 2012-04-16 21:18:54 | [diff] [blame] | 1001 | When editing the commit message, start the editor with the |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1002 | contents in the given file. The <code>commit.template</code> configuration |
Junio C Hamano | 51f87de | 2012-04-16 21:18:54 | [diff] [blame] | 1003 | variable is often used to give this option implicitly to the |
| 1004 | command. This mechanism can be used by projects that want to |
| 1005 | guide participants with some hints on what to write in the message |
| 1006 | in what order. If the user exits the editor without editing the |
| 1007 | message, the commit is aborted. This has no effect when a message |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1008 | is given by other means, e.g. with the <code>-m</code> or <code>-F</code> options. |
Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 1009 | </p> |
| 1010 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1011 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1012 | -s |
| 1013 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1014 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1015 | --signoff |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1016 | </dt> |
| 1017 | <dd> |
| 1018 | <p> |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 1019 | Add Signed-off-by line by the committer at the end of the commit |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1020 | log message. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1021 | </p> |
| 1022 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1023 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1024 | -n |
| 1025 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1026 | <dt class="hdlist1"> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1027 | --no-verify |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1028 | </dt> |
| 1029 | <dd> |
| 1030 | <p> |
Junio C Hamano | 942b35e | 2007-12-09 10:19:33 | [diff] [blame] | 1031 | This option bypasses the pre-commit and commit-msg hooks. |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1032 | See also <a href="githooks.html">githooks(5)</a>. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1033 | </p> |
| 1034 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1035 | <dt class="hdlist1"> |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 1036 | --allow-empty |
| 1037 | </dt> |
| 1038 | <dd> |
| 1039 | <p> |
| 1040 | Usually recording a commit that has the exact same tree as its |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 1041 | sole parent commit is a mistake, and the command prevents you |
| 1042 | from making such a commit. This option bypasses the safety, and |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 1043 | is primarily for use by foreign SCM interface scripts. |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 1044 | </p> |
| 1045 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1046 | <dt class="hdlist1"> |
Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame] | 1047 | --allow-empty-message |
| 1048 | </dt> |
| 1049 | <dd> |
| 1050 | <p> |
| 1051 | Like --allow-empty this command is primarily for use by foreign |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 1052 | SCM interface scripts. It allows you to create a commit with an |
Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame] | 1053 | empty commit message without using plumbing commands like |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1054 | <a href="git-commit-tree.html">git-commit-tree(1)</a>. |
Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame] | 1055 | </p> |
| 1056 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1057 | <dt class="hdlist1"> |
Junio C Hamano | 554da79 | 2007-12-27 03:29:58 | [diff] [blame] | 1058 | --cleanup=<mode> |
| 1059 | </dt> |
| 1060 | <dd> |
| 1061 | <p> |
| 1062 | This option sets how the commit message is cleaned up. |
| 1063 | The <em><mode></em> can be one of <em>verbatim</em>, <em>whitespace</em>, <em>strip</em>, |
| 1064 | and <em>default</em>. The <em>default</em> mode will strip leading and |
| 1065 | trailing empty lines and #commentary from the commit message |
| 1066 | only if the message is to be edited. Otherwise only whitespace |
| 1067 | removed. The <em>verbatim</em> mode does not change message at all, |
| 1068 | <em>whitespace</em> removes just leading/trailing whitespace lines |
Junio C Hamano | ce836cc | 2013-01-21 02:01:53 | [diff] [blame] | 1069 | and <em>strip</em> removes both whitespace and commentary. The default |
| 1070 | can be changed by the <em>commit.cleanup</em> configuration variable |
| 1071 | (see <a href="git-config.html">git-config(1)</a>). |
Junio C Hamano | 554da79 | 2007-12-27 03:29:58 | [diff] [blame] | 1072 | </p> |
| 1073 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1074 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1075 | -e |
| 1076 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1077 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1078 | --edit |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1079 | </dt> |
| 1080 | <dd> |
| 1081 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1082 | The message taken from file with <code>-F</code>, command line with |
| 1083 | <code>-m</code>, and from file with <code>-C</code> are usually used as the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1084 | commit log message unmodified. This option lets you |
| 1085 | further edit the message taken from these sources. |
| 1086 | </p> |
| 1087 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1088 | <dt class="hdlist1"> |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1089 | --no-edit |
| 1090 | </dt> |
| 1091 | <dd> |
| 1092 | <p> |
| 1093 | Use the selected commit message without launching an editor. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1094 | For example, <code>git commit --amend --no-edit</code> amends a commit |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1095 | without changing its commit message. |
| 1096 | </p> |
| 1097 | </dd> |
| 1098 | <dt class="hdlist1"> |
Junio C Hamano | bfe9e75 | 2006-04-05 21:43:28 | [diff] [blame] | 1099 | --amend |
| 1100 | </dt> |
| 1101 | <dd> |
| 1102 | <p> |
| 1103 | Used to amend the tip of the current branch. Prepare the tree |
| 1104 | object you would want to replace the latest commit as usual |
| 1105 | (this includes the usual -i/-o and explicit paths), and the |
| 1106 | commit log editor is seeded with the commit message from the |
| 1107 | tip of the current branch. The commit you create replaces the |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1108 | current tip — if it was a merge, it will have the parents of |
| 1109 | the current tip as parents — so the current top commit is |
Junio C Hamano | bfe9e75 | 2006-04-05 21:43:28 | [diff] [blame] | 1110 | discarded. |
| 1111 | </p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1112 | <div class="openblock"> |
| 1113 | <div class="content"> |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1114 | <div class="paragraph"><p>It is a rough equivalent for:</p></div> |
| 1115 | <div class="listingblock"> |
| 1116 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1117 | <pre><code> $ git reset --soft HEAD^ |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1118 | $ ... do something else to come up with the right tree ... |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1119 | $ git commit -c ORIG_HEAD</code></pre> |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1120 | </div></div> |
| 1121 | <div class="paragraph"><p>but can be used to amend a merge commit.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1122 | </div></div> |
Junio C Hamano | 4eb2b9c | 2012-11-15 21:12:29 | [diff] [blame] | 1123 | <div class="paragraph"><p>You should understand the implications of rewriting history if you |
| 1124 | amend a commit that has already been published. (See the "RECOVERING |
| 1125 | FROM UPSTREAM REBASE" section in <a href="git-rebase.html">git-rebase(1)</a>.)</p></div> |
Junio C Hamano | 9257a33 | 2012-06-25 20:01:02 | [diff] [blame] | 1126 | </dd> |
| 1127 | <dt class="hdlist1"> |
| 1128 | --no-post-rewrite |
| 1129 | </dt> |
| 1130 | <dd> |
| 1131 | <p> |
| 1132 | Bypass the post-rewrite hook. |
| 1133 | </p> |
| 1134 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1135 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1136 | -i |
| 1137 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1138 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1139 | --include |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1140 | </dt> |
| 1141 | <dd> |
| 1142 | <p> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1143 | Before making a commit out of staged contents so far, |
| 1144 | stage the contents of paths given on the command line |
| 1145 | as well. This is usually not what you want unless you |
| 1146 | are concluding a conflicted merge. |
Junio C Hamano | 6697ac5 | 2006-02-14 08:00:23 | [diff] [blame] | 1147 | </p> |
| 1148 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1149 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1150 | -o |
| 1151 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1152 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1153 | --only |
Junio C Hamano | e79159d | 2008-04-12 08:23:17 | [diff] [blame] | 1154 | </dt> |
| 1155 | <dd> |
| 1156 | <p> |
| 1157 | Make a commit only from the paths specified on the |
| 1158 | command line, disregarding any contents that have been |
| 1159 | staged so far. This is the default mode of operation of |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1160 | <em>git commit</em> if any paths are given on the command line, |
Junio C Hamano | e79159d | 2008-04-12 08:23:17 | [diff] [blame] | 1161 | in which case this option can be omitted. |
| 1162 | If this option is specified together with <em>--amend</em>, then |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 1163 | no paths need to be specified, which can be used to amend |
Junio C Hamano | e79159d | 2008-04-12 08:23:17 | [diff] [blame] | 1164 | the last commit without committing changes that have |
| 1165 | already been staged. |
| 1166 | </p> |
| 1167 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1168 | <dt class="hdlist1"> |
Junio C Hamano | 4224f99 | 2008-06-23 07:14:08 | [diff] [blame] | 1169 | -u[<mode>] |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1170 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1171 | <dt class="hdlist1"> |
Junio C Hamano | 4224f99 | 2008-06-23 07:14:08 | [diff] [blame] | 1172 | --untracked-files[=<mode>] |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1173 | </dt> |
| 1174 | <dd> |
| 1175 | <p> |
Junio C Hamano | 36a4dbc | 2011-02-22 07:51:32 | [diff] [blame] | 1176 | Show untracked files. |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1177 | </p> |
Junio C Hamano | 36a4dbc | 2011-02-22 07:51:32 | [diff] [blame] | 1178 | <div class="paragraph"><p>The mode parameter is optional (defaults to <em>all</em>), and is used to |
| 1179 | specify the handling of untracked files; when -u is not used, the |
| 1180 | default is <em>normal</em>, i.e. show untracked files and directories.</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1181 | <div class="paragraph"><p>The possible options are:</p></div> |
| 1182 | <div class="ulist"><ul> |
Junio C Hamano | 4224f99 | 2008-06-23 07:14:08 | [diff] [blame] | 1183 | <li> |
| 1184 | <p> |
| 1185 | <em>no</em> - Show no untracked files |
| 1186 | </p> |
| 1187 | </li> |
| 1188 | <li> |
| 1189 | <p> |
| 1190 | <em>normal</em> - Shows untracked files and directories |
| 1191 | </p> |
| 1192 | </li> |
| 1193 | <li> |
| 1194 | <p> |
| 1195 | <em>all</em> - Also shows individual files in untracked directories. |
| 1196 | </p> |
Junio C Hamano | 36a4dbc | 2011-02-22 07:51:32 | [diff] [blame] | 1197 | <div class="paragraph"><p>The default can be changed using the status.showUntrackedFiles |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1198 | configuration variable documented in <a href="git-config.html">git-config(1)</a>.</p></div> |
Junio C Hamano | e1cca18 | 2010-02-20 20:01:23 | [diff] [blame] | 1199 | </li> |
| 1200 | </ul></div> |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1201 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1202 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1203 | -v |
| 1204 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1205 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1206 | --verbose |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1207 | </dt> |
| 1208 | <dd> |
| 1209 | <p> |
| 1210 | Show unified diff between the HEAD commit and what |
| 1211 | would be committed at the bottom of the commit message |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1212 | template. Note that this diff output doesn’t have its |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1213 | lines prefixed with <em>#</em>. |
| 1214 | </p> |
| 1215 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1216 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1217 | -q |
| 1218 | </dt> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1219 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1220 | --quiet |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1221 | </dt> |
| 1222 | <dd> |
| 1223 | <p> |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 1224 | Suppress commit summary message. |
Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1225 | </p> |
| 1226 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1227 | <dt class="hdlist1"> |
Junio C Hamano | 1bb3199 | 2009-08-29 04:24:08 | [diff] [blame] | 1228 | --dry-run |
| 1229 | </dt> |
| 1230 | <dd> |
| 1231 | <p> |
| 1232 | Do not create a commit, but show a list of paths that are |
| 1233 | to be committed, paths with local changes that will be left |
| 1234 | uncommitted and paths that are untracked. |
| 1235 | </p> |
| 1236 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1237 | <dt class="hdlist1"> |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 1238 | --status |
| 1239 | </dt> |
| 1240 | <dd> |
| 1241 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1242 | Include the output of <a href="git-status.html">git-status(1)</a> in the commit |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 1243 | message template when using an editor to prepare the commit |
| 1244 | message. Defaults to on, but can be used to override |
| 1245 | configuration variable commit.status. |
| 1246 | </p> |
| 1247 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1248 | <dt class="hdlist1"> |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 1249 | --no-status |
| 1250 | </dt> |
| 1251 | <dd> |
| 1252 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1253 | Do not include the output of <a href="git-status.html">git-status(1)</a> in the |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 1254 | commit message template when using an editor to prepare the |
| 1255 | default commit message. |
| 1256 | </p> |
| 1257 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1258 | <dt class="hdlist1"> |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 1259 | -S[<keyid>] |
| 1260 | </dt> |
| 1261 | <dt class="hdlist1"> |
| 1262 | --gpg-sign[=<keyid>] |
| 1263 | </dt> |
| 1264 | <dd> |
| 1265 | <p> |
| 1266 | GPG-sign commit. |
| 1267 | </p> |
| 1268 | </dd> |
| 1269 | <dt class="hdlist1"> |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 1270 | -- |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1271 | </dt> |
| 1272 | <dd> |
| 1273 | <p> |
| 1274 | Do not interpret any more arguments as options. |
| 1275 | </p> |
| 1276 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1277 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1278 | <file>… |
| 1279 | </dt> |
| 1280 | <dd> |
| 1281 | <p> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1282 | When files are given on the command line, the command |
| 1283 | commits the contents of the named files, without |
| 1284 | recording the changes already staged. The contents of |
| 1285 | these files are also staged for the next commit on top |
| 1286 | of what have been staged before. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1287 | </p> |
| 1288 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1289 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1290 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1291 | </div> |
| 1292 | <div class="sect1"> |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1293 | <h2 id="_date_formats">DATE FORMATS</h2> |
| 1294 | <div class="sectionbody"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1295 | <div class="paragraph"><p>The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1296 | and the <code>--date</code> option |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1297 | support the following date formats:</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1298 | <div class="dlist"><dl> |
| 1299 | <dt class="hdlist1"> |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1300 | Git internal format |
| 1301 | </dt> |
| 1302 | <dd> |
| 1303 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1304 | It is <code><unix timestamp> <timezone offset></code>, where <code><unix |
| 1305 | timestamp></code> is the number of seconds since the UNIX epoch. |
| 1306 | <code><timezone offset></code> is a positive or negative offset from UTC. |
| 1307 | For example CET (which is 2 hours ahead UTC) is <code>+0200</code>. |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1308 | </p> |
| 1309 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1310 | <dt class="hdlist1"> |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1311 | RFC 2822 |
| 1312 | </dt> |
| 1313 | <dd> |
| 1314 | <p> |
| 1315 | The standard email format as described by RFC 2822, for example |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1316 | <code>Thu, 07 Apr 2005 22:13:13 +0200</code>. |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1317 | </p> |
| 1318 | </dd> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1319 | <dt class="hdlist1"> |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1320 | ISO 8601 |
| 1321 | </dt> |
| 1322 | <dd> |
| 1323 | <p> |
| 1324 | Time and date specified by the ISO 8601 standard, for example |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1325 | <code>2005-04-07T22:13:13</code>. The parser accepts a space instead of the |
| 1326 | <code>T</code> character as well. |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1327 | </p> |
| 1328 | <div class="admonitionblock"> |
| 1329 | <table><tr> |
| 1330 | <td class="icon"> |
| 1331 | <div class="title">Note</div> |
| 1332 | </td> |
| 1333 | <td class="content">In addition, the date part is accepted in the following formats: |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1334 | <code>YYYY.MM.DD</code>, <code>MM/DD/YYYY</code> and <code>DD.MM.YYYY</code>.</td> |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1335 | </tr></table> |
| 1336 | </div> |
| 1337 | </dd> |
| 1338 | </dl></div> |
| 1339 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1340 | </div> |
| 1341 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1342 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1343 | <div class="sectionbody"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1344 | <div class="paragraph"><p>When recording your own work, the contents of modified files in |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1345 | your working tree are temporarily stored to a staging area |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1346 | called the "index" with <em>git add</em>. A file can be |
Junio C Hamano | 361c133 | 2007-11-14 12:17:22 | [diff] [blame] | 1347 | reverted back, only in the index but not in the working tree, |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1348 | to that of the last commit with <code>git reset HEAD -- <file></code>, |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1349 | which effectively reverts <em>git add</em> and prevents the changes to |
Junio C Hamano | 361c133 | 2007-11-14 12:17:22 | [diff] [blame] | 1350 | this file from participating in the next commit. After building |
| 1351 | the state to be committed incrementally with these commands, |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1352 | <code>git commit</code> (without any pathname parameter) is used to record what |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1353 | has been staged so far. This is the most basic form of the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1354 | command. An example:</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1355 | <div class="listingblock"> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1356 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1357 | <pre><code>$ edit hello.c |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1358 | $ git rm goodbye.c |
| 1359 | $ git add hello.c |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1360 | $ git commit</code></pre> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1361 | </div></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1362 | <div class="paragraph"><p>Instead of staging files after each individual change, you can |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1363 | tell <code>git commit</code> to notice the changes to the files whose |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1364 | contents are tracked in |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1365 | your working tree and do corresponding <code>git add</code> and <code>git rm</code> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1366 | for you. That is, this example does the same as the earlier |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1367 | example if there is no other change in your working tree:</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1368 | <div class="listingblock"> |
| 1369 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1370 | <pre><code>$ edit hello.c |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1371 | $ rm goodbye.c |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1372 | $ git commit -a</code></pre> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1373 | </div></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1374 | <div class="paragraph"><p>The command <code>git commit -a</code> first looks at your working tree, |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1375 | notices that you have modified hello.c and removed goodbye.c, |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1376 | and performs necessary <code>git add</code> and <code>git rm</code> for you.</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1377 | <div class="paragraph"><p>After staging changes to many files, you can alter the order the |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1378 | changes are recorded in, by giving pathnames to <code>git commit</code>. |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1379 | When pathnames are given, the command makes a commit that |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1380 | only records the changes made to the named paths:</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1381 | <div class="listingblock"> |
| 1382 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1383 | <pre><code>$ edit hello.c hello.h |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1384 | $ git add hello.c hello.h |
| 1385 | $ edit Makefile |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1386 | $ git commit Makefile</code></pre> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1387 | </div></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1388 | <div class="paragraph"><p>This makes a commit that records the modification to <code>Makefile</code>. |
| 1389 | The changes staged for <code>hello.c</code> and <code>hello.h</code> are not included |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1390 | in the resulting commit. However, their changes are not lost — they are still staged and merely held back. After the above |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1391 | sequence, if you do:</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1392 | <div class="listingblock"> |
| 1393 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1394 | <pre><code>$ git commit</code></pre> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1395 | </div></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1396 | <div class="paragraph"><p>this second commit would record the changes to <code>hello.c</code> and |
| 1397 | <code>hello.h</code> as expected.</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1398 | <div class="paragraph"><p>After a merge (initiated by <em>git merge</em> or <em>git pull</em>) stops |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1399 | because of conflicts, cleanly merged |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1400 | paths are already staged to be committed for you, and paths that |
| 1401 | conflicted are left in unmerged state. You would have to first |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1402 | check which paths are conflicting with <em>git status</em> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1403 | and after fixing them manually in your working tree, you would |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1404 | stage the result as usual with <em>git add</em>:</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1405 | <div class="listingblock"> |
| 1406 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1407 | <pre><code>$ git status | grep unmerged |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1408 | unmerged: hello.c |
| 1409 | $ edit hello.c |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1410 | $ git add hello.c</code></pre> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1411 | </div></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1412 | <div class="paragraph"><p>After resolving conflicts and staging the result, <code>git ls-files -u</code> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1413 | would stop mentioning the conflicted path. When you are done, |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1414 | run <code>git commit</code> to finally record the merge:</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1415 | <div class="listingblock"> |
| 1416 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1417 | <pre><code>$ git commit</code></pre> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1418 | </div></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1419 | <div class="paragraph"><p>As with the case to record your own changes, you can use <code>-a</code> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1420 | option to save typing. One difference is that during a merge |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1421 | resolution, you cannot use <code>git commit</code> with pathnames to |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1422 | alter the order the changes are committed, because the merge |
| 1423 | should be recorded as a single commit. In fact, the command |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1424 | refuses to run when given pathnames (but see <code>-i</code> option).</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1425 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1426 | </div> |
| 1427 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1428 | <h2 id="_discussion">DISCUSSION</h2> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1429 | <div class="sectionbody"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1430 | <div class="paragraph"><p>Though not required, it’s a good idea to begin the commit message |
Junio C Hamano | 8f76dc6 | 2007-01-17 07:24:25 | [diff] [blame] | 1431 | with a single short (less than 50 character) line summarizing the |
| 1432 | change, followed by a blank line and then a more thorough description. |
Junio C Hamano | 281fd39 | 2012-09-17 23:57:41 | [diff] [blame] | 1433 | The text up to the first blank line in a commit message is treated |
| 1434 | as the commit title, and that title is used throughout git. |
| 1435 | For example, <a href="git-format-patch.html">git-format-patch(1)</a> turns a commit into email, and it uses |
| 1436 | the title on the Subject line and the rest of the commit in the body.</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1437 | <div class="paragraph"><p>At the core level, git is character encoding agnostic.</p></div> |
| 1438 | <div class="ulist"><ul> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1439 | <li> |
| 1440 | <p> |
| 1441 | The pathnames recorded in the index and in the tree objects |
| 1442 | are treated as uninterpreted sequences of non-NUL bytes. |
| 1443 | What readdir(2) returns are what are recorded and compared |
| 1444 | with the data git keeps track of, which in turn are expected |
| 1445 | to be what lstat(2) and creat(2) accepts. There is no such |
| 1446 | thing as pathname encoding translation. |
| 1447 | </p> |
| 1448 | </li> |
| 1449 | <li> |
| 1450 | <p> |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 1451 | The contents of the blob objects are uninterpreted sequences |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1452 | of bytes. There is no encoding translation at the core |
| 1453 | level. |
| 1454 | </p> |
| 1455 | </li> |
| 1456 | <li> |
| 1457 | <p> |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 1458 | The commit log messages are uninterpreted sequences of non-NUL |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1459 | bytes. |
| 1460 | </p> |
| 1461 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1462 | </ul></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1463 | <div class="paragraph"><p>Although we encourage that the commit log messages are encoded |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1464 | in UTF-8, both the core and git Porcelain are designed not to |
| 1465 | force UTF-8 on projects. If all participants of a particular |
| 1466 | project find it more convenient to use legacy encodings, git |
| 1467 | does not forbid it. However, there are a few things to keep in |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1468 | mind.</p></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1469 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1470 | <li> |
| 1471 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1472 | <em>git commit</em> and <em>git commit-tree</em> issues |
Junio C Hamano | 14b7648 | 2008-01-05 10:32:26 | [diff] [blame] | 1473 | a warning if the commit log message given to it does not look |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1474 | like a valid UTF-8 string, unless you explicitly say your |
| 1475 | project uses a legacy encoding. The way to say this is to |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1476 | have i18n.commitencoding in <code>.git/config</code> file, like this: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1477 | </p> |
| 1478 | <div class="listingblock"> |
| 1479 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1480 | <pre><code>[i18n] |
| 1481 | commitencoding = ISO-8859-1</code></pre> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1482 | </div></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1483 | <div class="paragraph"><p>Commit objects created with the above setting record the value |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1484 | of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1485 | help other people who look at them later. Lack of this header |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1486 | implies that the commit log message is encoded in UTF-8.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1487 | </li> |
| 1488 | <li> |
| 1489 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1490 | <em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1491 | <code>encoding</code> header of a commit object, and try to re-code the |
Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 1492 | log message into UTF-8 unless otherwise specified. You can |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1493 | specify the desired output encoding with |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1494 | <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1495 | </p> |
| 1496 | <div class="listingblock"> |
| 1497 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1498 | <pre><code>[i18n] |
| 1499 | logoutputencoding = ISO-8859-1</code></pre> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1500 | </div></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1501 | <div class="paragraph"><p>If you do not have this configuration variable, the value of |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1502 | <code>i18n.commitencoding</code> is used instead.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1503 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1504 | </ol></div> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1505 | <div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1506 | message when a commit is made to force UTF-8 at the commit |
| 1507 | object level, because re-coding to UTF-8 is not necessarily a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1508 | reversible operation.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1509 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1510 | </div> |
| 1511 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1512 | <h2 id="_environment_and_configuration_variables">ENVIRONMENT AND CONFIGURATION VARIABLES</h2> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1513 | <div class="sectionbody"> |
Junio C Hamano | 6018664 | 2010-12-02 14:18:26 | [diff] [blame] | 1514 | <div class="paragraph"><p>The editor used to edit the commit log message will be chosen from the |
Junio C Hamano | f6002a9 | 2007-07-20 10:28:22 | [diff] [blame] | 1515 | GIT_EDITOR environment variable, the core.editor configuration variable, the |
| 1516 | VISUAL environment variable, or the EDITOR environment variable (in that |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1517 | order). See <a href="git-var.html">git-var(1)</a> for details.</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1518 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1519 | </div> |
| 1520 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1521 | <h2 id="_hooks">HOOKS</h2> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1522 | <div class="sectionbody"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1523 | <div class="paragraph"><p>This command can run <code>commit-msg</code>, <code>prepare-commit-msg</code>, <code>pre-commit</code>, |
| 1524 | and <code>post-commit</code> hooks. See <a href="githooks.html">githooks(5)</a> for more |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1525 | information.</p></div> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1526 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1527 | </div> |
| 1528 | <div class="sect1"> |
Junio C Hamano | 28a85be | 2012-07-24 22:05:15 | [diff] [blame] | 1529 | <h2 id="_files">FILES</h2> |
| 1530 | <div class="sectionbody"> |
| 1531 | <div class="dlist"><dl> |
| 1532 | <dt class="hdlist1"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1533 | <code>$GIT_DIR/COMMIT_EDITMSG</code> |
Junio C Hamano | 28a85be | 2012-07-24 22:05:15 | [diff] [blame] | 1534 | </dt> |
| 1535 | <dd> |
| 1536 | <p> |
| 1537 | This file contains the commit message of a commit in progress. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1538 | If <code>git commit</code> exits due to an error before creating a commit, |
Junio C Hamano | 28a85be | 2012-07-24 22:05:15 | [diff] [blame] | 1539 | any commit message that has been provided by the user (e.g., in |
| 1540 | an editor session) will be available in this file, but will be |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1541 | overwritten by the next invocation of <code>git commit</code>. |
Junio C Hamano | 28a85be | 2012-07-24 22:05:15 | [diff] [blame] | 1542 | </p> |
| 1543 | </dd> |
| 1544 | </dl></div> |
| 1545 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1546 | </div> |
| 1547 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1548 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | e7935c4 | 2006-12-13 21:32:17 | [diff] [blame] | 1549 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1550 | <div class="paragraph"><p><a href="git-add.html">git-add(1)</a>, |
| 1551 | <a href="git-rm.html">git-rm(1)</a>, |
| 1552 | <a href="git-mv.html">git-mv(1)</a>, |
| 1553 | <a href="git-merge.html">git-merge(1)</a>, |
| 1554 | <a href="git-commit-tree.html">git-commit-tree(1)</a></p></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1555 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1556 | </div> |
| 1557 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1558 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1559 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1560 | <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] | 1561 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1562 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1563 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1564 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1565 | <div id="footer"> |
| 1566 | <div id="footer-text"> |
Junio C Hamano | ce836cc | 2013-01-21 02:01:53 | [diff] [blame] | 1567 | Last updated 2013-01-20 18:01:21 PST |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1568 | </div> |
| 1569 | </div> |
| 1570 | </body> |
| 1571 | </html> |