Autogenerated HTML docs for v2.47.0-318-g04eaf
[git-htmldocs.git] / git-commit.html
blob47d1a92b9c98284f413c5f764758fc9d03b12252
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3 <head>
4 <meta charset="UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7 <meta name="generator" content="Asciidoctor 2.0.20"/>
8 <title>git-commit(1)</title>
9 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
10 <style>
11 /*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
12 /* Uncomment the following line when using as a custom stylesheet */
13 /* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
14 html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15 a{background:none}
16 a:focus{outline:thin dotted}
17 a:active,a:hover{outline:0}
18 h1{font-size:2em;margin:.67em 0}
19 b,strong{font-weight:bold}
20 abbr{font-size:.9em}
21 abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22 dfn{font-style:italic}
23 hr{height:0}
24 mark{background:#ff0;color:#000}
25 code,kbd,pre,samp{font-family:monospace;font-size:1em}
26 pre{white-space:pre-wrap}
27 q{quotes:"\201C" "\201D" "\2018" "\2019"}
28 small{font-size:80%}
29 sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30 sup{top:-.5em}
31 sub{bottom:-.25em}
32 img{border:0}
33 svg:not(:root){overflow:hidden}
34 figure{margin:0}
35 audio,video{display:inline-block}
36 audio:not([controls]){display:none;height:0}
37 fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38 legend{border:0;padding:0}
39 button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40 button,input{line-height:normal}
41 button,select{text-transform:none}
42 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43 button[disabled],html input[disabled]{cursor:default}
44 input[type=checkbox],input[type=radio]{padding:0}
45 button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46 textarea{overflow:auto;vertical-align:top}
47 table{border-collapse:collapse;border-spacing:0}
48 *,::before,::after{box-sizing:border-box}
49 html,body{font-size:100%}
50 body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
51 a:hover{cursor:pointer}
52 img,object,embed{max-width:100%;height:auto}
53 object,embed{height:100%}
54 img{-ms-interpolation-mode:bicubic}
55 .left{float:left!important}
56 .right{float:right!important}
57 .text-left{text-align:left!important}
58 .text-right{text-align:right!important}
59 .text-center{text-align:center!important}
60 .text-justify{text-align:justify!important}
61 .hide{display:none}
62 img,object,svg{display:inline-block;vertical-align:middle}
63 textarea{height:auto;min-height:50px}
64 select{width:100%}
65 .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
66 div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
67 a{color:#2156a5;text-decoration:underline;line-height:inherit}
68 a:hover,a:focus{color:#1d4b8f}
69 a img{border:0}
70 p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71 p aside{font-size:.875em;line-height:1.35;font-style:italic}
72 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
73 h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
74 h1{font-size:2.125em}
75 h2{font-size:1.6875em}
76 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77 h4,h5{font-size:1.125em}
78 h6{font-size:1em}
79 hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80 em,i{font-style:italic;line-height:inherit}
81 strong,b{font-weight:bold;line-height:inherit}
82 small{font-size:60%;line-height:inherit}
83 code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84 ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85 ul,ol{margin-left:1.5em}
86 ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87 ul.circle{list-style-type:circle}
88 ul.disc{list-style-type:disc}
89 ul.square{list-style-type:square}
90 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91 ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92 dl dt{margin-bottom:.3125em;font-weight:bold}
93 dl dd{margin-bottom:1.25em}
94 blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95 blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
96 @media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
97 h1{font-size:2.75em}
98 h2{font-size:2.3125em}
99 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100 h4{font-size:1.4375em}}
101 table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102 table thead,table tfoot{background:#f7f8f7}
103 table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
104 table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105 table tr.even,table tr.alt{background:#f8f8f7}
106 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108 h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
109 .center{margin-left:auto;margin-right:auto}
110 .stretch{width:100%}
111 .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
112 .clearfix::after,.float-group::after{clear:both}
113 :not(pre).nobreak{word-wrap:normal}
114 :not(pre).nowrap{white-space:nowrap}
115 :not(pre).pre-wrap{white-space:pre-wrap}
116 :not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
117 pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119 pre>code{display:block}
120 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121 em em{font-style:normal}
122 strong strong{font-weight:400}
123 .keyseq{color:rgba(51,51,51,.8)}
124 kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
125 .keyseq kbd:first-child{margin-left:0}
126 .keyseq kbd:last-child{margin-right:0}
127 .menuseq,.menuref{color:#000}
128 .menuseq b:not(.caret),.menuref{font-weight:inherit}
129 .menuseq{word-spacing:-.02em}
130 .menuseq b.caret{font-size:1.25em;line-height:.8}
131 .menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
132 b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133 b.button::before{content:"[";padding:0 3px 0 2px}
134 b.button::after{content:"]";padding:0 2px 0 3px}
135 p a>code:hover{color:rgba(0,0,0,.9)}
136 #header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
137 #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
138 #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
139 #content{margin-top:1.25em}
140 #content::before{content:none}
141 #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
142 #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
143 #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
144 #header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
145 #header .details span:first-child{margin-left:-.125em}
146 #header .details span.email a{color:rgba(0,0,0,.85)}
147 #header .details br{display:none}
148 #header .details br+span::before{content:"\00a0\2013\00a0"}
149 #header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
150 #header .details br+span#revremark::before{content:"\00a0|\00a0"}
151 #header #revnumber{text-transform:capitalize}
152 #header #revnumber::after{content:"\00a0"}
153 #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
154 #toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
155 #toc>ul{margin-left:.125em}
156 #toc ul.sectlevel0>li>a{font-style:italic}
157 #toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
158 #toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
159 #toc li{line-height:1.3334;margin-top:.3334em}
160 #toc a{text-decoration:none}
161 #toc a:active{text-decoration:underline}
162 #toctitle{color:#7a2518;font-size:1.2em}
163 @media screen and (min-width:768px){#toctitle{font-size:1.375em}
164 body.toc2{padding-left:15em;padding-right:0}
165 #toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
166 #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
167 #toc.toc2>ul{font-size:.9em;margin-bottom:0}
168 #toc.toc2 ul ul{margin-left:0;padding-left:1em}
169 #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
170 body.toc2.toc-right{padding-left:0;padding-right:15em}
171 body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
172 @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
173 #toc.toc2{width:20em}
174 #toc.toc2 #toctitle{font-size:1.375em}
175 #toc.toc2>ul{font-size:.95em}
176 #toc.toc2 ul ul{padding-left:1.25em}
177 body.toc2.toc-right{padding-left:0;padding-right:20em}}
178 #content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
179 #content #toc>:first-child{margin-top:0}
180 #content #toc>:last-child{margin-bottom:0}
181 #footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
182 #footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
183 #content{margin-bottom:.625em}
184 .sect1{padding-bottom:.625em}
185 @media screen and (min-width:768px){#content{margin-bottom:1.25em}
186 .sect1{padding-bottom:1.25em}}
187 .sect1:last-child{padding-bottom:0}
188 .sect1+.sect1{border-top:1px solid #e7e7e9}
189 #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
190 #content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
191 #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
192 #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
193 #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
194 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
195 details{margin-left:1.25rem}
196 details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197 details>summary::-webkit-details-marker{display:none}
198 details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
199 details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
200 details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
201 .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
202 table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
203 .paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
204 .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
205 .admonitionblock>table td.icon{text-align:center;width:80px}
206 .admonitionblock>table td.icon img{max-width:none}
207 .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
208 .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
209 .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
210 .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
211 .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
212 .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
213 .exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
214 .exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
215 .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
216 @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
217 @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
218 .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
219 .literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
220 .listingblock>.content{position:relative}
221 .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
222 .listingblock:hover code[data-lang]::before{display:block}
223 .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
224 .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
225 .listingblock pre.highlightjs{padding:0}
226 .listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
227 .listingblock pre.prettyprint{border-width:0}
228 .prettyprint{background:#f7f7f8}
229 pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
230 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
231 pre.prettyprint li code[data-lang]::before{opacity:1}
232 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233 table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
234 table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
235 table.linenotable td.code{padding-left:.75em}
236 table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
237 pre.pygments span.linenos{display:inline-block;margin-right:.75em}
238 .quoteblock{margin:0 1em 1.25em 1.5em;display:table}
239 .quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
240 .quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
241 .quoteblock blockquote{margin:0;padding:0;border:0}
242 .quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
243 .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
244 .quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
245 .verseblock{margin:0 1em 1.25em}
246 .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
247 .verseblock pre strong{font-weight:400}
248 .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
249 .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
250 .quoteblock .attribution br,.verseblock .attribution br{display:none}
251 .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
252 .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
253 .quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
254 .quoteblock.abstract{margin:0 1em 1.25em;display:block}
255 .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
256 .quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
257 .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
258 .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
259 .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
260 p.tableblock:last-child{margin-bottom:0}
261 td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
262 td.tableblock>.content>:last-child{margin-bottom:-1.25em}
263 table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
264 table.grid-all>*>tr>*{border-width:1px}
265 table.grid-cols>*>tr>*{border-width:0 1px}
266 table.grid-rows>*>tr>*{border-width:1px 0}
267 table.frame-all{border-width:1px}
268 table.frame-ends{border-width:1px 0}
269 table.frame-sides{border-width:0 1px}
270 table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
271 table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
272 table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
273 table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
274 table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
275 th.halign-left,td.halign-left{text-align:left}
276 th.halign-right,td.halign-right{text-align:right}
277 th.halign-center,td.halign-center{text-align:center}
278 th.valign-top,td.valign-top{vertical-align:top}
279 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280 th.valign-middle,td.valign-middle{vertical-align:middle}
281 table thead th,table tfoot th{font-weight:bold}
282 tbody tr th{background:#f7f8f7}
283 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
284 p.tableblock>code:only-child{background:none;padding:0}
285 p.tableblock{font-size:1em}
286 ol{margin-left:1.75em}
287 ul li ol{margin-left:1.5em}
288 dl dd{margin-left:1.125em}
289 dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
290 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
291 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
293 ul.unstyled,ol.unstyled{margin-left:0}
294 li>p:empty:only-child::before{content:"";display:inline-block}
295 ul.checklist>li>p:first-child{margin-left:-1em}
296 ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
297 ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
298 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
299 ul.inline>li{margin-left:1.25em}
300 .unstyled dl dt{font-weight:400;font-style:normal}
301 ol.arabic{list-style-type:decimal}
302 ol.decimal{list-style-type:decimal-leading-zero}
303 ol.loweralpha{list-style-type:lower-alpha}
304 ol.upperalpha{list-style-type:upper-alpha}
305 ol.lowerroman{list-style-type:lower-roman}
306 ol.upperroman{list-style-type:upper-roman}
307 ol.lowergreek{list-style-type:lower-greek}
308 .hdlist>table,.colist>table{border:0;background:none}
309 .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
310 td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
311 td.hdlist1{font-weight:bold;padding-bottom:1.25em}
312 td.hdlist2{word-wrap:anywhere}
313 .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
314 .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
315 .colist td:not([class]):first-child img{max-width:none}
316 .colist td:not([class]):last-child{padding:.25em 0}
317 .thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
318 .imageblock.left{margin:.25em .625em 1.25em 0}
319 .imageblock.right{margin:.25em 0 1.25em .625em}
320 .imageblock>.title{margin-bottom:0}
321 .imageblock.thumb,.imageblock.th{border-width:6px}
322 .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
323 .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
324 .image.left{margin-right:.625em}
325 .image.right{margin-left:.625em}
326 a.image{text-decoration:none;display:inline-block}
327 a.image object{pointer-events:none}
328 sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
329 sup.footnote a,sup.footnoteref a{text-decoration:none}
330 sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
331 #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
332 #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
333 #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
334 #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
335 #footnotes .footnote:last-of-type{margin-bottom:0}
336 #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
337 div.unbreakable{page-break-inside:avoid}
338 .big{font-size:larger}
339 .small{font-size:smaller}
340 .underline{text-decoration:underline}
341 .overline{text-decoration:overline}
342 .line-through{text-decoration:line-through}
343 .aqua{color:#00bfbf}
344 .aqua-background{background:#00fafa}
345 .black{color:#000}
346 .black-background{background:#000}
347 .blue{color:#0000bf}
348 .blue-background{background:#0000fa}
349 .fuchsia{color:#bf00bf}
350 .fuchsia-background{background:#fa00fa}
351 .gray{color:#606060}
352 .gray-background{background:#7d7d7d}
353 .green{color:#006000}
354 .green-background{background:#007d00}
355 .lime{color:#00bf00}
356 .lime-background{background:#00fa00}
357 .maroon{color:#600000}
358 .maroon-background{background:#7d0000}
359 .navy{color:#000060}
360 .navy-background{background:#00007d}
361 .olive{color:#606000}
362 .olive-background{background:#7d7d00}
363 .purple{color:#600060}
364 .purple-background{background:#7d007d}
365 .red{color:#bf0000}
366 .red-background{background:#fa0000}
367 .silver{color:#909090}
368 .silver-background{background:#bcbcbc}
369 .teal{color:#006060}
370 .teal-background{background:#007d7d}
371 .white{color:#bfbfbf}
372 .white-background{background:#fafafa}
373 .yellow{color:#bfbf00}
374 .yellow-background{background:#fafa00}
375 span.icon>.fa{cursor:default}
376 a span.icon>.fa{cursor:inherit}
377 .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
378 .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
379 .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
380 .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
381 .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
382 .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
383 .conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
384 .conum[data-value] *{color:#fff!important}
385 .conum[data-value]+b{display:none}
386 .conum[data-value]::after{content:attr(data-value)}
387 pre .conum[data-value]{position:relative;top:-.125em}
388 b.conum *{color:inherit!important}
389 .conum:not([data-value]):empty{display:none}
390 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391 h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
392 p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
393 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
394 p{margin-bottom:1.25rem}
395 .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
396 .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
397 .print-only{display:none!important}
398 @page{margin:1.25cm .75cm}
399 @media print{*{box-shadow:none!important;text-shadow:none!important}
400 html{font-size:80%}
401 a{color:inherit!important;text-decoration:underline!important}
402 a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
403 a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
404 abbr[title]{border-bottom:1px dotted}
405 abbr[title]::after{content:" (" attr(title) ")"}
406 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407 thead{display:table-header-group}
408 svg{max-width:100%}
409 p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
410 h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
411 #header,#content,#footnotes,#footer{max-width:none}
412 #toc,.sidebarblock,.exampleblock>.content{background:none!important}
413 #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
414 body.book #header{text-align:center}
415 body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
416 body.book #header .details{border:0!important;display:block;padding:0!important}
417 body.book #header .details span:first-child{margin-left:0!important}
418 body.book #header .details br{display:block}
419 body.book #header .details br+span::before{content:none!important}
420 body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
421 body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
422 .listingblock code[data-lang]::before{display:block}
423 #footer{padding:0 .9375em}
424 .hide-on-print{display:none!important}
425 .print-only{display:block!important}
426 .hide-for-print{display:none!important}
427 .show-for-print{display:inherit!important}}
428 @media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
429 .sect1{padding:0!important}
430 .sect1+.sect1{border:0}
431 #footer{background:none}
432 #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
433 @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
434 </style>
435 <style>
436 pre>code {
437 display: inline;
439 </style>
440 </head>
441 <body class="manpage">
442 <div id="header">
443 <h1>git-commit(1) Manual Page</h1>
444 <h2 id="_name">NAME</h2>
445 <div class="sectionbody">
446 <p>git-commit - Record changes to the repository</p>
447 </div>
448 </div>
449 <div id="content">
450 <div class="sect1">
451 <h2 id="_synopsis">SYNOPSIS</h2>
452 <div class="sectionbody">
453 <div class="verseblock">
454 <pre class="content"><em>git commit</em> [-a | --interactive | --patch] [-s] [-v] [-u&lt;mode&gt;] [--amend]
455 [--dry-run] [(-c | -C | --squash) &lt;commit&gt; | --fixup [(amend|reword):]&lt;commit&gt;]
456 [-F &lt;file&gt; | -m &lt;msg&gt;] [--reset-author] [--allow-empty]
457 [--allow-empty-message] [--no-verify] [-e] [--author=&lt;author&gt;]
458 [--date=&lt;date&gt;] [--cleanup=&lt;mode&gt;] [--[no-]status]
459 [-i | -o] [--pathspec-from-file=&lt;file&gt; [--pathspec-file-nul]]
460 [(--trailer &lt;token&gt;[(=|:)&lt;value&gt;])&#8230;&#8203;] [-S[&lt;keyid&gt;]]
461 [--] [&lt;pathspec&gt;&#8230;&#8203;]</pre>
462 </div>
463 </div>
464 </div>
465 <div class="sect1">
466 <h2 id="_description">DESCRIPTION</h2>
467 <div class="sectionbody">
468 <div class="paragraph">
469 <p>Create a new commit containing the current contents of the index and
470 the given log message describing the changes. The new commit is a
471 direct child of HEAD, usually the tip of the current branch, and the
472 branch is updated to point to it (unless no branch is associated with
473 the working tree, in which case HEAD is "detached" as described in
474 <a href="git-checkout.html">git-checkout(1)</a>).</p>
475 </div>
476 <div class="paragraph">
477 <p>The content to be committed can be specified in several ways:</p>
478 </div>
479 <div class="olist arabic">
480 <ol class="arabic">
481 <li>
482 <p>by using <a href="git-add.html">git-add(1)</a> to incrementally "add" changes to the
483 index before using the <em>commit</em> command (Note: even modified files
484 must be "added");</p>
485 </li>
486 <li>
487 <p>by using <a href="git-rm.html">git-rm(1)</a> to remove files from the working tree
488 and the index, again before using the <em>commit</em> command;</p>
489 </li>
490 <li>
491 <p>by listing files as arguments to the <em>commit</em> command
492 (without --interactive or --patch switch), in which
493 case the commit will ignore changes staged in the index, and instead
494 record the current content of the listed files (which must already
495 be known to Git);</p>
496 </li>
497 <li>
498 <p>by using the -a switch with the <em>commit</em> command to automatically
499 "add" changes from all known files (i.e. all files that are already
500 listed in the index) and to automatically "rm" files in the index
501 that have been removed from the working tree, and then perform the
502 actual commit;</p>
503 </li>
504 <li>
505 <p>by using the --interactive or --patch switches with the <em>commit</em> command
506 to decide one by one which files or hunks should be part of the commit
507 in addition to contents in the index,
508 before finalizing the operation. See the &#8220;Interactive Mode&#8221; section of
509 <a href="git-add.html">git-add(1)</a> to learn how to operate these modes.</p>
510 </li>
511 </ol>
512 </div>
513 <div class="paragraph">
514 <p>The <code>--dry-run</code> option can be used to obtain a
515 summary of what is included by any of the above for the next
516 commit by giving the same set of parameters (options and paths).</p>
517 </div>
518 <div class="paragraph">
519 <p>If you make a commit and then find a mistake immediately after
520 that, you can recover from it with <em>git reset</em>.</p>
521 </div>
522 </div>
523 </div>
524 <div class="sect1">
525 <h2 id="_options">OPTIONS</h2>
526 <div class="sectionbody">
527 <div class="dlist">
528 <dl>
529 <dt class="hdlist1">-a</dt>
530 <dt class="hdlist1">--all</dt>
531 <dd>
532 <p>Tell the command to automatically stage files that have
533 been modified and deleted, but new files you have not
534 told Git about are not affected.</p>
535 </dd>
536 <dt class="hdlist1">-p</dt>
537 <dt class="hdlist1">--patch</dt>
538 <dd>
539 <p>Use the interactive patch selection interface to choose
540 which changes to commit. See <a href="git-add.html">git-add(1)</a> for
541 details.</p>
542 </dd>
543 <dt class="hdlist1">-C &lt;commit&gt;</dt>
544 <dt class="hdlist1">--reuse-message=&lt;commit&gt;</dt>
545 <dd>
546 <p>Take an existing commit object, and reuse the log message
547 and the authorship information (including the timestamp)
548 when creating the commit.</p>
549 </dd>
550 <dt class="hdlist1">-c &lt;commit&gt;</dt>
551 <dt class="hdlist1">--reedit-message=&lt;commit&gt;</dt>
552 <dd>
553 <p>Like <em>-C</em>, but with <code>-c</code> the editor is invoked, so that
554 the user can further edit the commit message.</p>
555 </dd>
556 <dt class="hdlist1">--fixup=[(amend|reword):]&lt;commit&gt;</dt>
557 <dd>
558 <p>Create a new commit which "fixes up" <em>&lt;commit&gt;</em> when applied with
559 <code>git</code> <code>rebase</code> <code>--autosquash</code>. Plain <code>--fixup=</code><em>&lt;commit&gt;</em> creates a
560 "fixup!" commit which changes the content of <em>&lt;commit&gt;</em> but leaves
561 its log message untouched. <code>--fixup=amend:</code><em>&lt;commit&gt;</em> is similar but
562 creates an "amend!" commit which also replaces the log message of
563 <em>&lt;commit&gt;</em> with the log message of the "amend!" commit.
564 <code>--fixup=reword:</code><em>&lt;commit&gt;</em> creates an "amend!" commit which
565 replaces the log message of <em>&lt;commit&gt;</em> with its own log message
566 but makes no changes to the content of <em>&lt;commit&gt;</em>.</p>
567 <div class="paragraph">
568 <p>The commit created by plain <code>--fixup=</code><em>&lt;commit&gt;</em> has a subject
569 composed of "fixup!" followed by the subject line from &lt;commit&gt;,
570 and is recognized specially by <code>git</code> <code>rebase</code> <code>--autosquash</code>. The <code>-m</code>
571 option may be used to supplement the log message of the created
572 commit, but the additional commentary will be thrown away once the
573 "fixup!" commit is squashed into <em>&lt;commit&gt;</em> by
574 <code>git</code> <code>rebase</code> <code>--autosquash</code>.</p>
575 </div>
576 <div class="paragraph">
577 <p>The commit created by <code>--fixup=amend:</code><em>&lt;commit&gt;</em> is similar but its
578 subject is instead prefixed with "amend!". The log message of
579 &lt;commit&gt; is copied into the log message of the "amend!" commit and
580 opened in an editor so it can be refined. When <code>git</code> <code>rebase</code>
581 <code>--autosquash</code> squashes the "amend!" commit into <em>&lt;commit&gt;</em>, the
582 log message of <em>&lt;commit&gt;</em> is replaced by the refined log message
583 from the "amend!" commit. It is an error for the "amend!" commit&#8217;s
584 log message to be empty unless <code>--allow-empty-message</code> is
585 specified.</p>
586 </div>
587 <div class="paragraph">
588 <p><code>--fixup=reword:</code><em>&lt;commit&gt;</em> is shorthand for <code>--fixup=amend:</code><em>&lt;commit&gt;</em>
589 <code>--only</code>. It creates an "amend!" commit with only a log message
590 (ignoring any changes staged in the index). When squashed by <code>git</code>
591 <code>rebase</code> <code>--autosquash</code>, it replaces the log message of <em>&lt;commit&gt;</em>
592 without making any other changes.</p>
593 </div>
594 <div class="paragraph">
595 <p>Neither "fixup!" nor "amend!" commits change authorship of
596 <em>&lt;commit&gt;</em> when applied by <code>git</code> <code>rebase</code> <code>--autosquash</code>.
597 See <a href="git-rebase.html">git-rebase(1)</a> for details.</p>
598 </div>
599 </dd>
600 <dt class="hdlist1">--squash=&lt;commit&gt;</dt>
601 <dd>
602 <p>Construct a commit message for use with <code>rebase</code> <code>--autosquash</code>.
603 The commit message subject line is taken from the specified
604 commit with a prefix of "squash! ". Can be used with additional
605 commit message options (<code>-m</code>/<code>-c</code>/<code>-C</code>/<code>-F</code>). See
606 <a href="git-rebase.html">git-rebase(1)</a> for details.</p>
607 </dd>
608 <dt class="hdlist1">--reset-author</dt>
609 <dd>
610 <p>When used with -C/-c/--amend options, or when committing after a
611 conflicting cherry-pick, declare that the authorship of the
612 resulting commit now belongs to the committer. This also renews
613 the author timestamp.</p>
614 </dd>
615 <dt class="hdlist1">--short</dt>
616 <dd>
617 <p>When doing a dry-run, give the output in the short-format. See
618 <a href="git-status.html">git-status(1)</a> for details. Implies <code>--dry-run</code>.</p>
619 </dd>
620 <dt class="hdlist1">--branch</dt>
621 <dd>
622 <p>Show the branch and tracking info even in short-format.</p>
623 </dd>
624 <dt class="hdlist1">--porcelain</dt>
625 <dd>
626 <p>When doing a dry-run, give the output in a porcelain-ready
627 format. See <a href="git-status.html">git-status(1)</a> for details. Implies
628 <code>--dry-run</code>.</p>
629 </dd>
630 <dt class="hdlist1">--long</dt>
631 <dd>
632 <p>When doing a dry-run, give the output in the long-format.
633 Implies <code>--dry-run</code>.</p>
634 </dd>
635 <dt class="hdlist1">-z</dt>
636 <dt class="hdlist1">--null</dt>
637 <dd>
638 <p>When showing <code>short</code> or <code>porcelain</code> status output, print the
639 filename verbatim and terminate the entries with NUL, instead of LF.
640 If no format is given, implies the <code>--porcelain</code> output format.
641 Without the <code>-z</code> option, filenames with "unusual" characters are
642 quoted as explained for the configuration variable <code>core.quotePath</code>
643 (see <a href="git-config.html">git-config(1)</a>).</p>
644 </dd>
645 <dt class="hdlist1">-F &lt;file&gt;</dt>
646 <dt class="hdlist1">--file=&lt;file&gt;</dt>
647 <dd>
648 <p>Take the commit message from the given file. Use <em>-</em> to
649 read the message from the standard input.</p>
650 </dd>
651 <dt class="hdlist1">--author=&lt;author&gt;</dt>
652 <dd>
653 <p>Override the commit author. Specify an explicit author using the
654 standard <code>A</code> <code>U</code> <code>Thor</code> &lt;author@example.<code>com</code>&gt; format. Otherwise &lt;author&gt;
655 is assumed to be a pattern and is used to search for an existing
656 commit by that author (i.e. rev-list --all -i --author=&lt;author&gt;);
657 the commit author is then copied from the first such commit found.</p>
658 </dd>
659 <dt class="hdlist1">--date=&lt;date&gt;</dt>
660 <dd>
661 <p>Override the author date used in the commit.</p>
662 </dd>
663 <dt class="hdlist1">-m &lt;msg&gt;</dt>
664 <dt class="hdlist1">--message=&lt;msg&gt;</dt>
665 <dd>
666 <p>Use the given &lt;msg&gt; as the commit message.
667 If multiple <code>-m</code> options are given, their values are
668 concatenated as separate paragraphs.</p>
669 <div class="paragraph">
670 <p>The <code>-m</code> option is mutually exclusive with <code>-c</code>, <code>-C</code>, and <code>-F</code>.</p>
671 </div>
672 </dd>
673 <dt class="hdlist1">-t &lt;file&gt;</dt>
674 <dt class="hdlist1">--template=&lt;file&gt;</dt>
675 <dd>
676 <p>When editing the commit message, start the editor with the
677 contents in the given file. The <code>commit.template</code> configuration
678 variable is often used to give this option implicitly to the
679 command. This mechanism can be used by projects that want to
680 guide participants with some hints on what to write in the message
681 in what order. If the user exits the editor without editing the
682 message, the commit is aborted. This has no effect when a message
683 is given by other means, e.g. with the <code>-m</code> or <code>-F</code> options.</p>
684 </dd>
685 <dt class="hdlist1">-s</dt>
686 <dt class="hdlist1">--signoff</dt>
687 <dt class="hdlist1">--no-signoff</dt>
688 <dd>
689 <p>Add a <code>Signed-off-by</code> trailer by the committer at the end of the commit
690 log message. The meaning of a signoff depends on the project
691 to which you&#8217;re committing. For example, it may certify that
692 the committer has the rights to submit the work under the
693 project&#8217;s license or agrees to some contributor representation,
694 such as a Developer Certificate of Origin.
695 (See <a href="https://developercertificate.org" class="bare">https://developercertificate.org</a> for the one used by the
696 Linux kernel and Git projects.) Consult the documentation or
697 leadership of the project to which you&#8217;re contributing to
698 understand how the signoffs are used in that project.</p>
699 <div class="paragraph">
700 <p>The --no-signoff option can be used to countermand an earlier --signoff
701 option on the command line.</p>
702 </div>
703 </dd>
704 <dt class="hdlist1">--trailer &lt;token&gt;[(=|:)&lt;value&gt;]</dt>
705 <dd>
706 <p>Specify a (&lt;token&gt;, &lt;value&gt;) pair that should be applied as a
707 trailer. (e.g. <code>git</code> <code>commit</code> <code>--trailer</code> "Signed-off-by:C <code>O</code> <code>Mitter</code> \
708 &lt;committer@example.<code>com</code>&gt;" <code>--trailer</code> "Helped-by:C <code>O</code> <code>Mitter</code> \
709 &lt;committer@example.<code>com</code>&gt;" will add the "Signed-off-by" trailer
710 and the "Helped-by" trailer to the commit message.)
711 The <code>trailer.</code>* configuration variables
712 (<a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>) can be used to define if
713 a duplicated trailer is omitted, where in the run of trailers
714 each trailer would appear, and other details.</p>
715 </dd>
716 <dt class="hdlist1">-n</dt>
717 <dt class="hdlist1">--[no-]verify</dt>
718 <dd>
719 <p>By default, the pre-commit and commit-msg hooks are run.
720 When any of <code>--no-verify</code> or <code>-n</code> is given, these are bypassed.
721 See also <a href="githooks.html">githooks(5)</a>.</p>
722 </dd>
723 <dt class="hdlist1">--allow-empty</dt>
724 <dd>
725 <p>Usually recording a commit that has the exact same tree as its
726 sole parent commit is a mistake, and the command prevents you
727 from making such a commit. This option bypasses the safety, and
728 is primarily for use by foreign SCM interface scripts.</p>
729 </dd>
730 <dt class="hdlist1">--allow-empty-message</dt>
731 <dd>
732 <p>Like --allow-empty this command is primarily for use by foreign
733 SCM interface scripts. It allows you to create a commit with an
734 empty commit message without using plumbing commands like
735 <a href="git-commit-tree.html">git-commit-tree(1)</a>.</p>
736 </dd>
737 <dt class="hdlist1">--cleanup=&lt;mode&gt;</dt>
738 <dd>
739 <p>This option determines how the supplied commit message should be
740 cleaned up before committing. The <em>&lt;mode&gt;</em> can be <code>strip</code>,
741 <code>whitespace</code>, <code>verbatim</code>, <code>scissors</code> or <code>default</code>.</p>
742 <div class="openblock">
743 <div class="content">
744 <div class="dlist">
745 <dl>
746 <dt class="hdlist1">strip</dt>
747 <dd>
748 <p>Strip leading and trailing empty lines, trailing whitespace,
749 commentary and collapse consecutive empty lines.</p>
750 </dd>
751 <dt class="hdlist1">whitespace</dt>
752 <dd>
753 <p>Same as <code>strip</code> except #commentary is not removed.</p>
754 </dd>
755 <dt class="hdlist1">verbatim</dt>
756 <dd>
757 <p>Do not change the message at all.</p>
758 </dd>
759 <dt class="hdlist1">scissors</dt>
760 <dd>
761 <p>Same as <code>whitespace</code> except that everything from (and including)
762 the line found below is truncated, if the message is to be edited.
763 "#" can be customized with core.commentChar.</p>
764 <div class="literalblock">
765 <div class="content">
766 <pre># ------------------------ &gt;8 ------------------------</pre>
767 </div>
768 </div>
769 </dd>
770 <dt class="hdlist1">default</dt>
771 <dd>
772 <p>Same as <code>strip</code> if the message is to be edited.
773 Otherwise <code>whitespace</code>.</p>
774 </dd>
775 </dl>
776 </div>
777 </div>
778 </div>
779 <div class="paragraph">
780 <p>The default can be changed by the <code>commit.cleanup</code> configuration
781 variable (see <a href="git-config.html">git-config(1)</a>).</p>
782 </div>
783 </dd>
784 <dt class="hdlist1">-e</dt>
785 <dt class="hdlist1">--edit</dt>
786 <dd>
787 <p>The message taken from file with <code>-F</code>, command line with
788 <code>-m</code>, and from commit object with <code>-C</code> are usually used as
789 the commit log message unmodified. This option lets you
790 further edit the message taken from these sources.</p>
791 </dd>
792 <dt class="hdlist1">--no-edit</dt>
793 <dd>
794 <p>Use the selected commit message without launching an editor.
795 For example, <code>git</code> <code>commit</code> <code>--amend</code> <code>--no-edit</code> amends a commit
796 without changing its commit message.</p>
797 </dd>
798 <dt class="hdlist1">--amend</dt>
799 <dd>
800 <p>Replace the tip of the current branch by creating a new
801 commit. The recorded tree is prepared as usual (including
802 the effect of the <code>-i</code> and <code>-o</code> options and explicit
803 pathspec), and the message from the original commit is used
804 as the starting point, instead of an empty message, when no
805 other message is specified from the command line via options
806 such as <code>-m</code>, <code>-F</code>, <code>-c</code>, etc. The new commit has the same
807 parents and author as the current one (the <code>--reset-author</code>
808 option can countermand this).</p>
809 <div class="openblock">
810 <div class="content">
811 <div class="paragraph">
812 <p>It is a rough equivalent for:</p>
813 </div>
814 <div class="listingblock">
815 <div class="content">
816 <pre> $ git reset --soft HEAD^
817 $ ... do something else to come up with the right tree ...
818 $ git commit -c ORIG_HEAD</pre>
819 </div>
820 </div>
821 <div class="paragraph">
822 <p>but can be used to amend a merge commit.</p>
823 </div>
824 </div>
825 </div>
826 <div class="paragraph">
827 <p>You should understand the implications of rewriting history if you
828 amend a commit that has already been published. (See the "RECOVERING
829 FROM UPSTREAM REBASE" section in <a href="git-rebase.html">git-rebase(1)</a>.)</p>
830 </div>
831 </dd>
832 <dt class="hdlist1">--no-post-rewrite</dt>
833 <dd>
834 <p>Bypass the post-rewrite hook.</p>
835 </dd>
836 <dt class="hdlist1">-i</dt>
837 <dt class="hdlist1">--include</dt>
838 <dd>
839 <p>Before making a commit out of staged contents so far,
840 stage the contents of paths given on the command line
841 as well. This is usually not what you want unless you
842 are concluding a conflicted merge.</p>
843 </dd>
844 <dt class="hdlist1">-o</dt>
845 <dt class="hdlist1">--only</dt>
846 <dd>
847 <p>Make a commit by taking the updated working tree contents
848 of the paths specified on the
849 command line, disregarding any contents that have been
850 staged for other paths. This is the default mode of operation of
851 <em>git commit</em> if any paths are given on the command line,
852 in which case this option can be omitted.
853 If this option is specified together with <code>--amend</code>, then
854 no paths need to be specified, which can be used to amend
855 the last commit without committing changes that have
856 already been staged. If used together with <code>--allow-empty</code>
857 paths are also not required, and an empty commit will be created.</p>
858 </dd>
859 <dt class="hdlist1">--pathspec-from-file=&lt;file&gt;</dt>
860 <dd>
861 <p>Pathspec is passed in <em>&lt;file&gt;</em> instead of commandline args. If
862 <em>&lt;file&gt;</em> is exactly <code>-</code> then standard input is used. Pathspec
863 elements are separated by LF or CR/LF. Pathspec elements can be
864 quoted as explained for the configuration variable <code>core.quotePath</code>
865 (see <a href="git-config.html">git-config(1)</a>). See also <code>--pathspec-file-nul</code> and
866 global <code>--literal-pathspecs</code>.</p>
867 </dd>
868 <dt class="hdlist1">--pathspec-file-nul</dt>
869 <dd>
870 <p>Only meaningful with <code>--pathspec-from-file</code>. Pathspec elements are
871 separated with NUL character and all other characters are taken
872 literally (including newlines and quotes).</p>
873 </dd>
874 <dt class="hdlist1">-u[&lt;mode&gt;]</dt>
875 <dt class="hdlist1">--untracked-files[=&lt;mode&gt;]</dt>
876 <dd>
877 <p>Show untracked files.</p>
878 <div class="openblock">
879 <div class="content">
880 <div class="paragraph">
881 <p>The mode parameter is optional (defaults to <em>all</em>), and is used to
882 specify the handling of untracked files; when -u is not used, the
883 default is <em>normal</em>, i.e. show untracked files and directories.</p>
884 </div>
885 <div class="paragraph">
886 <p>The possible options are:</p>
887 </div>
888 <div class="ulist">
889 <ul>
890 <li>
891 <p><em>no</em> - Show no untracked files</p>
892 </li>
893 <li>
894 <p><em>normal</em> - Shows untracked files and directories</p>
895 </li>
896 <li>
897 <p><em>all</em> - Also shows individual files in untracked directories.</p>
898 </li>
899 </ul>
900 </div>
901 <div class="paragraph">
902 <p>All usual spellings for Boolean value <code>true</code> are taken as <code>normal</code>
903 and <code>false</code> as <code>no</code>.
904 The default can be changed using the status.showUntrackedFiles
905 configuration variable documented in <a href="git-config.html">git-config(1)</a>.</p>
906 </div>
907 </div>
908 </div>
909 </dd>
910 <dt class="hdlist1">-v</dt>
911 <dt class="hdlist1">--verbose</dt>
912 <dd>
913 <p>Show unified diff between the HEAD commit and what
914 would be committed at the bottom of the commit message
915 template to help the user describe the commit by reminding
916 what changes the commit has.
917 Note that this diff output doesn&#8217;t have its
918 lines prefixed with <em>#</em>. This diff will not be a part
919 of the commit message. See the <code>commit.verbose</code> configuration
920 variable in <a href="git-config.html">git-config(1)</a>.</p>
921 <div class="paragraph">
922 <p>If specified twice, show in addition the unified diff between
923 what would be committed and the worktree files, i.e. the unstaged
924 changes to tracked files.</p>
925 </div>
926 </dd>
927 <dt class="hdlist1">-q</dt>
928 <dt class="hdlist1">--quiet</dt>
929 <dd>
930 <p>Suppress commit summary message.</p>
931 </dd>
932 <dt class="hdlist1">--dry-run</dt>
933 <dd>
934 <p>Do not create a commit, but show a list of paths that are
935 to be committed, paths with local changes that will be left
936 uncommitted and paths that are untracked.</p>
937 </dd>
938 <dt class="hdlist1">--status</dt>
939 <dd>
940 <p>Include the output of <a href="git-status.html">git-status(1)</a> in the commit
941 message template when using an editor to prepare the commit
942 message. Defaults to on, but can be used to override
943 configuration variable commit.status.</p>
944 </dd>
945 <dt class="hdlist1">--no-status</dt>
946 <dd>
947 <p>Do not include the output of <a href="git-status.html">git-status(1)</a> in the
948 commit message template when using an editor to prepare the
949 default commit message.</p>
950 </dd>
951 <dt class="hdlist1">-S[&lt;keyid&gt;]</dt>
952 <dt class="hdlist1">--gpg-sign[=&lt;keyid&gt;]</dt>
953 <dt class="hdlist1">--no-gpg-sign</dt>
954 <dd>
955 <p>GPG-sign commits. The <code>keyid</code> argument is optional and
956 defaults to the committer identity; if specified, it must be
957 stuck to the option without a space. <code>--no-gpg-sign</code> is useful to
958 countermand both <code>commit.gpgSign</code> configuration variable, and
959 earlier <code>--gpg-sign</code>.</p>
960 </dd>
961 <dt class="hdlist1">--</dt>
962 <dd>
963 <p>Do not interpret any more arguments as options.</p>
964 </dd>
965 <dt class="hdlist1">&lt;pathspec&gt;&#8230;&#8203;</dt>
966 <dd>
967 <p>When pathspec is given on the command line, commit the contents of
968 the files that match the pathspec without recording the changes
969 already added to the index. The contents of these files are also
970 staged for the next commit on top of what have been staged before.</p>
971 <div class="paragraph">
972 <p>For more details, see the <em>pathspec</em> entry in <a href="gitglossary.html">gitglossary(7)</a>.</p>
973 </div>
974 </dd>
975 </dl>
976 </div>
977 </div>
978 </div>
979 <div class="sect1">
980 <h2 id="_examples">EXAMPLES</h2>
981 <div class="sectionbody">
982 <div class="paragraph">
983 <p>When recording your own work, the contents of modified files in
984 your working tree are temporarily stored to a staging area
985 called the "index" with <em>git add</em>. A file can be
986 reverted back, only in the index but not in the working tree,
987 to that of the last commit with <code>git</code> <code>restore</code> <code>--staged</code> <em>&lt;file&gt;</em>,
988 which effectively reverts <em>git add</em> and prevents the changes to
989 this file from participating in the next commit. After building
990 the state to be committed incrementally with these commands,
991 <code>git</code> <code>commit</code> (without any pathname parameter) is used to record what
992 has been staged so far. This is the most basic form of the
993 command. An example:</p>
994 </div>
995 <div class="listingblock">
996 <div class="content">
997 <pre>$ edit hello.c
998 $ git rm goodbye.c
999 $ git add hello.c
1000 $ git commit</pre>
1001 </div>
1002 </div>
1003 <div class="paragraph">
1004 <p>Instead of staging files after each individual change, you can
1005 tell <code>git</code> <code>commit</code> to notice the changes to the files whose
1006 contents are tracked in
1007 your working tree and do corresponding <code>git</code> <code>add</code> and <code>git</code> <code>rm</code>
1008 for you. That is, this example does the same as the earlier
1009 example if there is no other change in your working tree:</p>
1010 </div>
1011 <div class="listingblock">
1012 <div class="content">
1013 <pre>$ edit hello.c
1014 $ rm goodbye.c
1015 $ git commit -a</pre>
1016 </div>
1017 </div>
1018 <div class="paragraph">
1019 <p>The command <code>git</code> <code>commit</code> <code>-a</code> first looks at your working tree,
1020 notices that you have modified hello.c and removed goodbye.c,
1021 and performs necessary <code>git</code> <code>add</code> and <code>git</code> <code>rm</code> for you.</p>
1022 </div>
1023 <div class="paragraph">
1024 <p>After staging changes to many files, you can alter the order the
1025 changes are recorded in, by giving pathnames to <code>git</code> <code>commit</code>.
1026 When pathnames are given, the command makes a commit that
1027 only records the changes made to the named paths:</p>
1028 </div>
1029 <div class="listingblock">
1030 <div class="content">
1031 <pre>$ edit hello.c hello.h
1032 $ git add hello.c hello.h
1033 $ edit Makefile
1034 $ git commit Makefile</pre>
1035 </div>
1036 </div>
1037 <div class="paragraph">
1038 <p>This makes a commit that records the modification to <code>Makefile</code>.
1039 The changes staged for <code>hello.c</code> and <code>hello.h</code> are not included
1040 in the resulting commit. However, their changes are not lost&#8201;&#8212;&#8201;they are still staged and merely held back. After the above
1041 sequence, if you do:</p>
1042 </div>
1043 <div class="listingblock">
1044 <div class="content">
1045 <pre>$ git commit</pre>
1046 </div>
1047 </div>
1048 <div class="paragraph">
1049 <p>this second commit would record the changes to <code>hello.c</code> and
1050 <code>hello.h</code> as expected.</p>
1051 </div>
1052 <div class="paragraph">
1053 <p>After a merge (initiated by <em>git merge</em> or <em>git pull</em>) stops
1054 because of conflicts, cleanly merged
1055 paths are already staged to be committed for you, and paths that
1056 conflicted are left in unmerged state. You would have to first
1057 check which paths are conflicting with <em>git status</em>
1058 and after fixing them manually in your working tree, you would
1059 stage the result as usual with <em>git add</em>:</p>
1060 </div>
1061 <div class="listingblock">
1062 <div class="content">
1063 <pre>$ git status | grep unmerged
1064 unmerged: hello.c
1065 $ edit hello.c
1066 $ git add hello.c</pre>
1067 </div>
1068 </div>
1069 <div class="paragraph">
1070 <p>After resolving conflicts and staging the result, <code>git</code> <code>ls-files</code> <code>-u</code>
1071 would stop mentioning the conflicted path. When you are done,
1072 run <code>git</code> <code>commit</code> to finally record the merge:</p>
1073 </div>
1074 <div class="listingblock">
1075 <div class="content">
1076 <pre>$ git commit</pre>
1077 </div>
1078 </div>
1079 <div class="paragraph">
1080 <p>As with the case to record your own changes, you can use <code>-a</code>
1081 option to save typing. One difference is that during a merge
1082 resolution, you cannot use <code>git</code> <code>commit</code> with pathnames to
1083 alter the order the changes are committed, because the merge
1084 should be recorded as a single commit. In fact, the command
1085 refuses to run when given pathnames (but see <code>-i</code> option).</p>
1086 </div>
1087 </div>
1088 </div>
1089 <div class="sect1">
1090 <h2 id="_commit_information">COMMIT INFORMATION</h2>
1091 <div class="sectionbody">
1092 <div class="paragraph">
1093 <p>Author and committer information is taken from the following environment
1094 variables, if set:</p>
1095 </div>
1096 <div class="literalblock">
1097 <div class="content">
1098 <pre>GIT_AUTHOR_NAME
1099 GIT_AUTHOR_EMAIL
1100 GIT_AUTHOR_DATE
1101 GIT_COMMITTER_NAME
1102 GIT_COMMITTER_EMAIL
1103 GIT_COMMITTER_DATE</pre>
1104 </div>
1105 </div>
1106 <div class="paragraph">
1107 <p>(nb "&lt;", "&gt;" and "\n"s are stripped)</p>
1108 </div>
1109 <div class="paragraph">
1110 <p>The author and committer names are by convention some form of a personal name
1111 (that is, the name by which other humans refer to you), although Git does not
1112 enforce or require any particular form. Arbitrary Unicode may be used, subject
1113 to the constraints listed above. This name has no effect on authentication; for
1114 that, see the <code>credential.username</code> variable in <a href="git-config.html">git-config(1)</a>.</p>
1115 </div>
1116 <div class="paragraph">
1117 <p>In case (some of) these environment variables are not set, the information
1118 is taken from the configuration items <code>user.name</code> and <code>user.email</code>, or, if not
1119 present, the environment variable EMAIL, or, if that is not set,
1120 system user name and the hostname used for outgoing mail (taken
1121 from <code>/etc/mailname</code> and falling back to the fully qualified hostname when
1122 that file does not exist).</p>
1123 </div>
1124 <div class="paragraph">
1125 <p>The <code>author.name</code> and <code>committer.name</code> and their corresponding email options
1126 override <code>user.name</code> and <code>user.email</code> if set and are overridden themselves by
1127 the environment variables.</p>
1128 </div>
1129 <div class="paragraph">
1130 <p>The typical usage is to set just the <code>user.name</code> and <code>user.email</code> variables;
1131 the other options are provided for more complex use cases.</p>
1132 </div>
1133 </div>
1134 </div>
1135 <div class="sect1">
1136 <h2 id="_date_formats">DATE FORMATS</h2>
1137 <div class="sectionbody">
1138 <div class="paragraph">
1139 <p>The <code>GIT_AUTHOR_DATE</code> and <code>GIT_COMMITTER_DATE</code> environment variables
1140 support the following date formats:</p>
1141 </div>
1142 <div class="dlist">
1143 <dl>
1144 <dt class="hdlist1">Git internal format</dt>
1145 <dd>
1146 <p>It is <em>&lt;unix-timestamp&gt;</em> <em>&lt;time-zone-offset&gt;</em>, where
1147 <em>&lt;unix-timestamp&gt;</em> is the number of seconds since the UNIX epoch.
1148 <em>&lt;time-zone-offset&gt;</em> is a positive or negative offset from UTC.
1149 For example CET (which is 1 hour ahead of UTC) is <code>+0100</code>.</p>
1150 </dd>
1151 <dt class="hdlist1">RFC 2822</dt>
1152 <dd>
1153 <p>The standard date format as described by RFC 2822, for example
1154 <code>Thu,</code> <code>07</code> <code>Apr</code> <code>2005</code> <code>22:13:13</code> <code>+0200</code>.</p>
1155 </dd>
1156 <dt class="hdlist1">ISO 8601</dt>
1157 <dd>
1158 <p>Time and date specified by the ISO 8601 standard, for example
1159 <code>2005-04-07T22:13:13</code>. The parser accepts a space instead of the
1160 <code>T</code> character as well. Fractional parts of a second will be ignored,
1161 for example <code>2005-04-07T22:13:13.019</code> will be treated as
1162 <code>2005-04-07T22:13:13</code>.</p>
1163 <div class="admonitionblock note">
1164 <table>
1165 <tr>
1166 <td class="icon">
1167 <div class="title">Note</div>
1168 </td>
1169 <td class="content">
1170 In addition, the date part is accepted in the following formats:
1171 <code>YYYY.MM.DD</code>, <code>MM/DD/YYYY</code> and <code>DD.MM.YYYY</code>.
1172 </td>
1173 </tr>
1174 </table>
1175 </div>
1176 </dd>
1177 </dl>
1178 </div>
1179 <div class="paragraph">
1180 <p>In addition to recognizing all date formats above, the <code>--date</code> option
1181 will also try to make sense of other, more human-centric date formats,
1182 such as relative dates like "yesterday" or "last Friday at noon".</p>
1183 </div>
1184 </div>
1185 </div>
1186 <div class="sect1">
1187 <h2 id="_discussion">DISCUSSION</h2>
1188 <div class="sectionbody">
1189 <div class="paragraph">
1190 <p>Though not required, it&#8217;s a good idea to begin the commit message
1191 with a single short (no more than 50 characters) line summarizing the
1192 change, followed by a blank line and then a more thorough description.
1193 The text up to the first blank line in a commit message is treated
1194 as the commit title, and that title is used throughout Git.
1195 For example, <a href="git-format-patch.html">git-format-patch(1)</a> turns a commit into email, and it uses
1196 the title on the Subject line and the rest of the commit in the body.</p>
1197 </div>
1198 <div class="paragraph">
1199 <p>Git is to some extent character encoding agnostic.</p>
1200 </div>
1201 <div class="ulist">
1202 <ul>
1203 <li>
1204 <p>The contents of the blob objects are uninterpreted sequences
1205 of bytes. There is no encoding translation at the core
1206 level.</p>
1207 </li>
1208 <li>
1209 <p>Path names are encoded in UTF-8 normalization form C. This
1210 applies to tree objects, the index file, ref names, as well as
1211 path names in command line arguments, environment variables
1212 and config files (.<code>git/config</code> (see <a href="git-config.html">git-config(1)</a>),
1213 <a href="gitignore.html">gitignore(5)</a>, <a href="gitattributes.html">gitattributes(5)</a> and
1214 <a href="gitmodules.html">gitmodules(5)</a>).</p>
1215 <div class="paragraph">
1216 <p>Note that Git at the core level treats path names simply as
1217 sequences of non-NUL bytes, there are no path name encoding
1218 conversions (except on Mac and Windows). Therefore, using
1219 non-ASCII path names will mostly work even on platforms and file
1220 systems that use legacy extended ASCII encodings. However,
1221 repositories created on such systems will not work properly on
1222 UTF-8-based systems (e.g. Linux, Mac, Windows) and vice versa.
1223 Additionally, many Git-based tools simply assume path names to
1224 be UTF-8 and will fail to display other encodings correctly.</p>
1225 </div>
1226 </li>
1227 <li>
1228 <p>Commit log messages are typically encoded in UTF-8, but other
1229 extended ASCII encodings are also supported. This includes
1230 ISO-8859-x, CP125x and many others, but <em>not</em> UTF-16/32,
1231 EBCDIC and CJK multi-byte encodings (GBK, Shift-JIS, Big5,
1232 EUC-x, CP9xx etc.).</p>
1233 </li>
1234 </ul>
1235 </div>
1236 <div class="paragraph">
1237 <p>Although we encourage that the commit log messages are encoded
1238 in UTF-8, both the core and Git Porcelain are designed not to
1239 force UTF-8 on projects. If all participants of a particular
1240 project find it more convenient to use legacy encodings, Git
1241 does not forbid it. However, there are a few things to keep in
1242 mind.</p>
1243 </div>
1244 <div class="olist arabic">
1245 <ol class="arabic">
1246 <li>
1247 <p><em>git commit</em> and <em>git commit-tree</em> issue
1248 a warning if the commit log message given to it does not look
1249 like a valid UTF-8 string, unless you explicitly say your
1250 project uses a legacy encoding. The way to say this is to
1251 have <code>i18n.commitEncoding</code> in .<code>git/config</code> file, like this:</p>
1252 <div class="listingblock">
1253 <div class="content">
1254 <pre>[i18n]
1255 commitEncoding = ISO-8859-1</pre>
1256 </div>
1257 </div>
1258 <div class="paragraph">
1259 <p>Commit objects created with the above setting record the value
1260 of <code>i18n.commitEncoding</code> in their <code>encoding</code> header. This is to
1261 help other people who look at them later. Lack of this header
1262 implies that the commit log message is encoded in UTF-8.</p>
1263 </div>
1264 </li>
1265 <li>
1266 <p><em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
1267 <code>encoding</code> header of a commit object, and try to re-code the
1268 log message into UTF-8 unless otherwise specified. You can
1269 specify the desired output encoding with
1270 <code>i18n.logOutputEncoding</code> in .<code>git/config</code> file, like this:</p>
1271 <div class="listingblock">
1272 <div class="content">
1273 <pre>[i18n]
1274 logOutputEncoding = ISO-8859-1</pre>
1275 </div>
1276 </div>
1277 <div class="paragraph">
1278 <p>If you do not have this configuration variable, the value of
1279 <code>i18n.commitEncoding</code> is used instead.</p>
1280 </div>
1281 </li>
1282 </ol>
1283 </div>
1284 <div class="paragraph">
1285 <p>Note that we deliberately chose not to re-code the commit log
1286 message when a commit is made to force UTF-8 at the commit
1287 object level, because re-coding to UTF-8 is not necessarily a
1288 reversible operation.</p>
1289 </div>
1290 </div>
1291 </div>
1292 <div class="sect1">
1293 <h2 id="_environment_and_configuration_variables">ENVIRONMENT AND CONFIGURATION VARIABLES</h2>
1294 <div class="sectionbody">
1295 <div class="paragraph">
1296 <p>The editor used to edit the commit log message will be chosen from the
1297 <code>GIT_EDITOR</code> environment variable, the core.editor configuration variable, the
1298 <code>VISUAL</code> environment variable, or the <code>EDITOR</code> environment variable (in that
1299 order). See <a href="git-var.html">git-var(1)</a> for details.</p>
1300 </div>
1301 <div class="paragraph">
1302 <p>Everything above this line in this section isn&#8217;t included from the
1303 <a href="git-config.html">git-config(1)</a> documentation. The content that follows is the
1304 same as what&#8217;s found there:</p>
1305 </div>
1306 <div class="dlist">
1307 <dl>
1308 <dt class="hdlist1">commit.cleanup</dt>
1309 <dd>
1310 <p>This setting overrides the default of the <code>--cleanup</code> option in
1311 <code>git</code> <code>commit</code>. See <a href="git-commit.html">git-commit(1)</a> for details. Changing the
1312 default can be useful when you always want to keep lines that begin
1313 with the comment character # in your log message, in which case you
1314 would do <code>git</code> <code>config</code> <code>commit.cleanup</code> <code>whitespace</code> (note that you will
1315 have to remove the help lines that begin with # in the commit log
1316 template yourself, if you do this).</p>
1317 </dd>
1318 <dt class="hdlist1">commit.gpgSign</dt>
1319 <dd>
1320 <p>A boolean to specify whether all commits should be GPG signed.
1321 Use of this option when doing operations such as rebase can
1322 result in a large number of commits being signed. It may be
1323 convenient to use an agent to avoid typing your GPG passphrase
1324 several times.</p>
1325 </dd>
1326 <dt class="hdlist1">commit.status</dt>
1327 <dd>
1328 <p>A boolean to enable/disable inclusion of status information in the
1329 commit message template when using an editor to prepare the commit
1330 message. Defaults to true.</p>
1331 </dd>
1332 <dt class="hdlist1">commit.template</dt>
1333 <dd>
1334 <p>Specify the pathname of a file to use as the template for
1335 new commit messages.</p>
1336 </dd>
1337 <dt class="hdlist1">commit.verbose</dt>
1338 <dd>
1339 <p>A boolean or int to specify the level of verbosity with <code>git</code> <code>commit</code>.
1340 See <a href="git-commit.html">git-commit(1)</a>.</p>
1341 </dd>
1342 </dl>
1343 </div>
1344 </div>
1345 </div>
1346 <div class="sect1">
1347 <h2 id="_hooks">HOOKS</h2>
1348 <div class="sectionbody">
1349 <div class="paragraph">
1350 <p>This command can run <code>commit-msg</code>, <code>prepare-commit-msg</code>, <code>pre-commit</code>,
1351 <code>post-commit</code> and <code>post-rewrite</code> hooks. See <a href="githooks.html">githooks(5)</a> for more
1352 information.</p>
1353 </div>
1354 </div>
1355 </div>
1356 <div class="sect1">
1357 <h2 id="_files">FILES</h2>
1358 <div class="sectionbody">
1359 <div class="dlist">
1360 <dl>
1361 <dt class="hdlist1"><code>$GIT_DIR/COMMIT_EDITMSG</code></dt>
1362 <dd>
1363 <p>This file contains the commit message of a commit in progress.
1364 If <code>git</code> <code>commit</code> exits due to an error before creating a commit,
1365 any commit message that has been provided by the user (e.g., in
1366 an editor session) will be available in this file, but will be
1367 overwritten by the next invocation of <code>git</code> <code>commit</code>.</p>
1368 </dd>
1369 </dl>
1370 </div>
1371 </div>
1372 </div>
1373 <div class="sect1">
1374 <h2 id="_see_also">SEE ALSO</h2>
1375 <div class="sectionbody">
1376 <div class="paragraph">
1377 <p><a href="git-add.html">git-add(1)</a>,
1378 <a href="git-rm.html">git-rm(1)</a>,
1379 <a href="git-mv.html">git-mv(1)</a>,
1380 <a href="git-merge.html">git-merge(1)</a>,
1381 <a href="git-commit-tree.html">git-commit-tree(1)</a></p>
1382 </div>
1383 </div>
1384 </div>
1385 <div class="sect1">
1386 <h2 id="_git">GIT</h2>
1387 <div class="sectionbody">
1388 <div class="paragraph">
1389 <p>Part of the <a href="git.html">git(1)</a> suite</p>
1390 </div>
1391 </div>
1392 </div>
1393 </div>
1394 <div id="footer">
1395 <div id="footer-text">
1396 Last updated 2024-07-31 17:55:56 -0700
1397 </div>
1398 </div>
1399 </body>
1400 </html>