]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git.txt
Merge branch 'jn/test-prereq-perl-doc' into maint
[thirdparty/git.git] / Documentation / git.txt
CommitLineData
9e1f0a85 1git(1)
2cf565c5 2======
2cf565c5
DG
3
4NAME
5----
6git - the stupid content tracker
7
8
9SYNOPSIS
10--------
8b70004b 11[verse]
68e4b552
ZJS
12'git' [--version] [--help] [-c <name>=<value>]
13 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
d49483f0
JT
14 [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
15 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
68e4b552 16 <command> [<args>]
2cf565c5
DG
17
18DESCRIPTION
19-----------
23091e95
BF
20Git is a fast, scalable, distributed revision control system with an
21unusually rich command set that provides both high-level operations
22and full access to internals.
23
6998e4db 24See linkgit:gittutorial[7] to get started, then see
7687ae98
JH
25link:everyday.html[Everyday Git] for a useful minimum set of
26commands. The link:user-manual.html[Git User's Manual] has a more
27in-depth introduction.
cb22bc44 28
7687ae98 29After you mastered the basic concepts, you can come back to this
2de9b711
TA
30page to learn what commands Git offers. You can learn more about
31individual Git commands with "git help command". linkgit:gitcli[7]
7687ae98 32manual page gives you an overview of the command line command syntax.
4514ad4f 33
2de9b711 34Formatted and hyperlinked version of the latest Git documentation
7687ae98 35can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
34b604af 36
26cfcfbf
JH
37ifdef::stalenotes[]
38[NOTE]
39============
26cfcfbf 40
2ff3f61a 41You are reading the documentation for the latest (possibly
2de9b711 42unreleased) version of Git, that is available from 'master'
2ff3f61a
JH
43branch of the `git.git` repository.
44Documentation for older releases are available here:
43a8e4fe 45
dcb11cca 46* link:v1.8.4.2/git.html[documentation for release 1.8.4.2]
e230c568
JH
47
48* release notes for
dcb11cca 49 link:RelNotes/1.8.4.2.txt[1.8.4.2],
02a110ad 50 link:RelNotes/1.8.4.1.txt[1.8.4.1],
e230c568
JH
51 link:RelNotes/1.8.4.txt[1.8.4].
52
117eea7e 53* link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
54219a4d
JH
54
55* release notes for
117eea7e 56 link:RelNotes/1.8.3.4.txt[1.8.3.4],
5addd1c7 57 link:RelNotes/1.8.3.3.txt[1.8.3.3],
3a461832 58 link:RelNotes/1.8.3.2.txt[1.8.3.2],
362de916 59 link:RelNotes/1.8.3.1.txt[1.8.3.1],
54219a4d
JH
60 link:RelNotes/1.8.3.txt[1.8.3].
61
92758dd2 62* link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
239222f5
JH
63
64* release notes for
54219a4d
JH
65 link:RelNotes/1.8.2.3.txt[1.8.2.3],
66 link:RelNotes/1.8.2.2.txt[1.8.2.2],
67 link:RelNotes/1.8.2.1.txt[1.8.2.1],
239222f5
JH
68 link:RelNotes/1.8.2.txt[1.8.2].
69
2137ce01 70* link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
5d417842
JH
71
72* release notes for
2137ce01 73 link:RelNotes/1.8.1.6.txt[1.8.1.6],
e6363a49 74 link:RelNotes/1.8.1.5.txt[1.8.1.5],
dff9f883 75 link:RelNotes/1.8.1.4.txt[1.8.1.4],
f3500825
JH
76 link:RelNotes/1.8.1.3.txt[1.8.1.3],
77 link:RelNotes/1.8.1.2.txt[1.8.1.2],
e4f59a32 78 link:RelNotes/1.8.1.1.txt[1.8.1.1],
5d417842
JH
79 link:RelNotes/1.8.1.txt[1.8.1].
80
15999998 81* link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
8c7a786b
JH
82
83* release notes for
15999998 84 link:RelNotes/1.8.0.3.txt[1.8.0.3],
3e53891f 85 link:RelNotes/1.8.0.2.txt[1.8.0.2],
ed9fe755
JH
86 link:RelNotes/1.8.0.1.txt[1.8.0.1],
87 link:RelNotes/1.8.0.txt[1.8.0].
8c7a786b 88
7e201053 89* link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
889d3589
JH
90
91* release notes for
7e201053 92 link:RelNotes/1.7.12.4.txt[1.7.12.4],
234cd456 93 link:RelNotes/1.7.12.3.txt[1.7.12.3],
d8cf053d 94 link:RelNotes/1.7.12.2.txt[1.7.12.2],
304b7d99 95 link:RelNotes/1.7.12.1.txt[1.7.12.1],
889d3589
JH
96 link:RelNotes/1.7.12.txt[1.7.12].
97
bafc478f 98* link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
0ce2e396
JH
99
100* release notes for
bafc478f 101 link:RelNotes/1.7.11.7.txt[1.7.11.7],
e09e4024 102 link:RelNotes/1.7.11.6.txt[1.7.11.6],
cd7c0be1 103 link:RelNotes/1.7.11.5.txt[1.7.11.5],
0e4c8822 104 link:RelNotes/1.7.11.4.txt[1.7.11.4],
e6dfbcf1 105 link:RelNotes/1.7.11.3.txt[1.7.11.3],
8d141a1d 106 link:RelNotes/1.7.11.2.txt[1.7.11.2],
0e64a95a 107 link:RelNotes/1.7.11.1.txt[1.7.11.1],
0ce2e396
JH
108 link:RelNotes/1.7.11.txt[1.7.11].
109
785ee496 110* link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
e8dde3e5
JH
111
112* release notes for
785ee496 113 link:RelNotes/1.7.10.5.txt[1.7.10.5],
121f71f0 114 link:RelNotes/1.7.10.4.txt[1.7.10.4],
6a6d72b1 115 link:RelNotes/1.7.10.3.txt[1.7.10.3],
b6555d73 116 link:RelNotes/1.7.10.2.txt[1.7.10.2],
bf505158 117 link:RelNotes/1.7.10.1.txt[1.7.10.1],
e8dde3e5
JH
118 link:RelNotes/1.7.10.txt[1.7.10].
119
d0f1ea60 120* link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
828ea97d
JH
121
122* release notes for
d0f1ea60 123 link:RelNotes/1.7.9.7.txt[1.7.9.7],
cb2ed324 124 link:RelNotes/1.7.9.6.txt[1.7.9.6],
8ced9c90 125 link:RelNotes/1.7.9.5.txt[1.7.9.5],
a4603481 126 link:RelNotes/1.7.9.4.txt[1.7.9.4],
69f4e08f 127 link:RelNotes/1.7.9.3.txt[1.7.9.3],
78f4c9f6 128 link:RelNotes/1.7.9.2.txt[1.7.9.2],
90020e3b 129 link:RelNotes/1.7.9.1.txt[1.7.9.1],
828ea97d
JH
130 link:RelNotes/1.7.9.txt[1.7.9].
131
d9f5ef7a 132* link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
406da780
JH
133
134* release notes for
d9f5ef7a 135 link:RelNotes/1.7.8.6.txt[1.7.8.6],
cb2ed324 136 link:RelNotes/1.7.8.5.txt[1.7.8.5],
c572f491 137 link:RelNotes/1.7.8.4.txt[1.7.8.4],
5f4d133f
JH
138 link:RelNotes/1.7.8.3.txt[1.7.8.3],
139 link:RelNotes/1.7.8.2.txt[1.7.8.2],
140 link:RelNotes/1.7.8.1.txt[1.7.8.1],
406da780
JH
141 link:RelNotes/1.7.8.txt[1.7.8].
142
82588584 143* link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
703f05ad
JH
144
145* release notes for
82588584 146 link:RelNotes/1.7.7.7.txt[1.7.7.7],
c572f491 147 link:RelNotes/1.7.7.6.txt[1.7.7.6],
66c11f02
JH
148 link:RelNotes/1.7.7.5.txt[1.7.7.5],
149 link:RelNotes/1.7.7.4.txt[1.7.7.4],
150 link:RelNotes/1.7.7.3.txt[1.7.7.3],
151 link:RelNotes/1.7.7.2.txt[1.7.7.2],
f7d958df 152 link:RelNotes/1.7.7.1.txt[1.7.7.1],
703f05ad
JH
153 link:RelNotes/1.7.7.txt[1.7.7].
154
f174a258 155* link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
f696543d
JH
156
157* release notes for
f174a258 158 link:RelNotes/1.7.6.6.txt[1.7.6.6],
15b7898c 159 link:RelNotes/1.7.6.5.txt[1.7.6.5],
63205264 160 link:RelNotes/1.7.6.4.txt[1.7.6.4],
740a8fc2 161 link:RelNotes/1.7.6.3.txt[1.7.6.3],
509d5970
JH
162 link:RelNotes/1.7.6.2.txt[1.7.6.2],
163 link:RelNotes/1.7.6.1.txt[1.7.6.1],
f696543d
JH
164 link:RelNotes/1.7.6.txt[1.7.6].
165
e5af0de2 166* link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
ec014eac
JH
167
168* release notes for
e5af0de2 169 link:RelNotes/1.7.5.4.txt[1.7.5.4],
3c3e0b3c 170 link:RelNotes/1.7.5.3.txt[1.7.5.3],
3d5ae435 171 link:RelNotes/1.7.5.2.txt[1.7.5.2],
2f312e88 172 link:RelNotes/1.7.5.1.txt[1.7.5.1],
ec014eac
JH
173 link:RelNotes/1.7.5.txt[1.7.5].
174
6ceb270c 175* link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
7ed863a8
JH
176
177* release notes for
6ceb270c 178 link:RelNotes/1.7.4.5.txt[1.7.4.5],
6be05591 179 link:RelNotes/1.7.4.4.txt[1.7.4.4],
cb35c064
JH
180 link:RelNotes/1.7.4.3.txt[1.7.4.3],
181 link:RelNotes/1.7.4.2.txt[1.7.4.2],
9971d6d5 182 link:RelNotes/1.7.4.1.txt[1.7.4.1],
7ed863a8
JH
183 link:RelNotes/1.7.4.txt[1.7.4].
184
685e9d91 185* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
87b50542
JH
186
187* release notes for
685e9d91 188 link:RelNotes/1.7.3.5.txt[1.7.3.5],
15368e18 189 link:RelNotes/1.7.3.4.txt[1.7.3.4],
ed94cc76 190 link:RelNotes/1.7.3.3.txt[1.7.3.3],
8a904385 191 link:RelNotes/1.7.3.2.txt[1.7.3.2],
92c1e717 192 link:RelNotes/1.7.3.1.txt[1.7.3.1],
87b50542
JH
193 link:RelNotes/1.7.3.txt[1.7.3].
194
1b974346 195* link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
64fdc08d
JH
196
197* release notes for
1b974346 198 link:RelNotes/1.7.2.5.txt[1.7.2.5],
ed94cc76 199 link:RelNotes/1.7.2.4.txt[1.7.2.4],
761e742d
NP
200 link:RelNotes/1.7.2.3.txt[1.7.2.3],
201 link:RelNotes/1.7.2.2.txt[1.7.2.2],
202 link:RelNotes/1.7.2.1.txt[1.7.2.1],
203 link:RelNotes/1.7.2.txt[1.7.2].
64fdc08d 204
1b974346 205* link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
d599e048
JH
206
207* release notes for
1b974346 208 link:RelNotes/1.7.1.4.txt[1.7.1.4],
ed94cc76 209 link:RelNotes/1.7.1.3.txt[1.7.1.3],
761e742d
NP
210 link:RelNotes/1.7.1.2.txt[1.7.1.2],
211 link:RelNotes/1.7.1.1.txt[1.7.1.1],
212 link:RelNotes/1.7.1.txt[1.7.1].
d599e048 213
1b974346 214* link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
e923eaeb
JH
215
216* release notes for
1b974346 217 link:RelNotes/1.7.0.9.txt[1.7.0.9],
ed94cc76 218 link:RelNotes/1.7.0.8.txt[1.7.0.8],
761e742d
NP
219 link:RelNotes/1.7.0.7.txt[1.7.0.7],
220 link:RelNotes/1.7.0.6.txt[1.7.0.6],
221 link:RelNotes/1.7.0.5.txt[1.7.0.5],
222 link:RelNotes/1.7.0.4.txt[1.7.0.4],
223 link:RelNotes/1.7.0.3.txt[1.7.0.3],
224 link:RelNotes/1.7.0.2.txt[1.7.0.2],
225 link:RelNotes/1.7.0.1.txt[1.7.0.1],
226 link:RelNotes/1.7.0.txt[1.7.0].
e923eaeb 227
1b974346 228* link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
902f2353
JH
229
230* release notes for
1b974346 231 link:RelNotes/1.6.6.3.txt[1.6.6.3],
761e742d
NP
232 link:RelNotes/1.6.6.2.txt[1.6.6.2],
233 link:RelNotes/1.6.6.1.txt[1.6.6.1],
234 link:RelNotes/1.6.6.txt[1.6.6].
902f2353 235
1b974346 236* link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
78d553b7
JH
237
238* release notes for
1b974346 239 link:RelNotes/1.6.5.9.txt[1.6.5.9],
761e742d
NP
240 link:RelNotes/1.6.5.8.txt[1.6.5.8],
241 link:RelNotes/1.6.5.7.txt[1.6.5.7],
242 link:RelNotes/1.6.5.6.txt[1.6.5.6],
243 link:RelNotes/1.6.5.5.txt[1.6.5.5],
244 link:RelNotes/1.6.5.4.txt[1.6.5.4],
245 link:RelNotes/1.6.5.3.txt[1.6.5.3],
246 link:RelNotes/1.6.5.2.txt[1.6.5.2],
247 link:RelNotes/1.6.5.1.txt[1.6.5.1],
248 link:RelNotes/1.6.5.txt[1.6.5].
78d553b7 249
1b974346 250* link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
0a53e9dd
JH
251
252* release notes for
1b974346 253 link:RelNotes/1.6.4.5.txt[1.6.4.5],
761e742d
NP
254 link:RelNotes/1.6.4.4.txt[1.6.4.4],
255 link:RelNotes/1.6.4.3.txt[1.6.4.3],
256 link:RelNotes/1.6.4.2.txt[1.6.4.2],
257 link:RelNotes/1.6.4.1.txt[1.6.4.1],
258 link:RelNotes/1.6.4.txt[1.6.4].
0a53e9dd 259
441b40d8 260* link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
6096d759
JH
261
262* release notes for
761e742d
NP
263 link:RelNotes/1.6.3.4.txt[1.6.3.4],
264 link:RelNotes/1.6.3.3.txt[1.6.3.3],
265 link:RelNotes/1.6.3.2.txt[1.6.3.2],
266 link:RelNotes/1.6.3.1.txt[1.6.3.1],
267 link:RelNotes/1.6.3.txt[1.6.3].
a95148de
JH
268
269* release notes for
761e742d
NP
270 link:RelNotes/1.6.2.5.txt[1.6.2.5],
271 link:RelNotes/1.6.2.4.txt[1.6.2.4],
272 link:RelNotes/1.6.2.3.txt[1.6.2.3],
273 link:RelNotes/1.6.2.2.txt[1.6.2.2],
274 link:RelNotes/1.6.2.1.txt[1.6.2.1],
275 link:RelNotes/1.6.2.txt[1.6.2].
a95148de 276
621f1b4b 277* link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
8104ebfe
JH
278
279* release notes for
761e742d
NP
280 link:RelNotes/1.6.1.3.txt[1.6.1.3],
281 link:RelNotes/1.6.1.2.txt[1.6.1.2],
282 link:RelNotes/1.6.1.1.txt[1.6.1.1],
283 link:RelNotes/1.6.1.txt[1.6.1].
8104ebfe 284
efe05b01 285* link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
ea02eef0
JH
286
287* release notes for
761e742d
NP
288 link:RelNotes/1.6.0.6.txt[1.6.0.6],
289 link:RelNotes/1.6.0.5.txt[1.6.0.5],
290 link:RelNotes/1.6.0.4.txt[1.6.0.4],
291 link:RelNotes/1.6.0.3.txt[1.6.0.3],
292 link:RelNotes/1.6.0.2.txt[1.6.0.2],
293 link:RelNotes/1.6.0.1.txt[1.6.0.1],
294 link:RelNotes/1.6.0.txt[1.6.0].
ea02eef0 295
efe05b01 296* link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
e449f105
JH
297
298* release notes for
761e742d
NP
299 link:RelNotes/1.5.6.6.txt[1.5.6.6],
300 link:RelNotes/1.5.6.5.txt[1.5.6.5],
301 link:RelNotes/1.5.6.4.txt[1.5.6.4],
302 link:RelNotes/1.5.6.3.txt[1.5.6.3],
303 link:RelNotes/1.5.6.2.txt[1.5.6.2],
304 link:RelNotes/1.5.6.1.txt[1.5.6.1],
305 link:RelNotes/1.5.6.txt[1.5.6].
e449f105 306
efe05b01 307* link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
1d2375dd
JH
308
309* release notes for
761e742d
NP
310 link:RelNotes/1.5.5.6.txt[1.5.5.6],
311 link:RelNotes/1.5.5.5.txt[1.5.5.5],
312 link:RelNotes/1.5.5.4.txt[1.5.5.4],
313 link:RelNotes/1.5.5.3.txt[1.5.5.3],
314 link:RelNotes/1.5.5.2.txt[1.5.5.2],
315 link:RelNotes/1.5.5.1.txt[1.5.5.1],
316 link:RelNotes/1.5.5.txt[1.5.5].
1d2375dd 317
efe05b01 318* link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
6ce8e44a
JH
319
320* release notes for
761e742d
NP
321 link:RelNotes/1.5.4.7.txt[1.5.4.7],
322 link:RelNotes/1.5.4.6.txt[1.5.4.6],
323 link:RelNotes/1.5.4.5.txt[1.5.4.5],
324 link:RelNotes/1.5.4.4.txt[1.5.4.4],
325 link:RelNotes/1.5.4.3.txt[1.5.4.3],
326 link:RelNotes/1.5.4.2.txt[1.5.4.2],
327 link:RelNotes/1.5.4.1.txt[1.5.4.1],
328 link:RelNotes/1.5.4.txt[1.5.4].
6ce8e44a 329
e708af6e 330* link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
5587cac2
JH
331
332* release notes for
761e742d
NP
333 link:RelNotes/1.5.3.8.txt[1.5.3.8],
334 link:RelNotes/1.5.3.7.txt[1.5.3.7],
335 link:RelNotes/1.5.3.6.txt[1.5.3.6],
336 link:RelNotes/1.5.3.5.txt[1.5.3.5],
337 link:RelNotes/1.5.3.4.txt[1.5.3.4],
338 link:RelNotes/1.5.3.3.txt[1.5.3.3],
339 link:RelNotes/1.5.3.2.txt[1.5.3.2],
340 link:RelNotes/1.5.3.1.txt[1.5.3.1],
341 link:RelNotes/1.5.3.txt[1.5.3].
b6e4db6a 342
e636106c
JH
343* link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
344
aba170cd 345* release notes for
761e742d
NP
346 link:RelNotes/1.5.2.5.txt[1.5.2.5],
347 link:RelNotes/1.5.2.4.txt[1.5.2.4],
348 link:RelNotes/1.5.2.3.txt[1.5.2.3],
349 link:RelNotes/1.5.2.2.txt[1.5.2.2],
350 link:RelNotes/1.5.2.1.txt[1.5.2.1],
351 link:RelNotes/1.5.2.txt[1.5.2].
aba170cd
JH
352
353* link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
354
355* release notes for
761e742d
NP
356 link:RelNotes/1.5.1.6.txt[1.5.1.6],
357 link:RelNotes/1.5.1.5.txt[1.5.1.5],
358 link:RelNotes/1.5.1.4.txt[1.5.1.4],
359 link:RelNotes/1.5.1.3.txt[1.5.1.3],
360 link:RelNotes/1.5.1.2.txt[1.5.1.2],
361 link:RelNotes/1.5.1.1.txt[1.5.1.1],
362 link:RelNotes/1.5.1.txt[1.5.1].
2ff3f61a
JH
363
364* link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
365
aba170cd 366* release notes for
761e742d
NP
367 link:RelNotes/1.5.0.7.txt[1.5.0.7],
368 link:RelNotes/1.5.0.6.txt[1.5.0.6],
369 link:RelNotes/1.5.0.5.txt[1.5.0.5],
370 link:RelNotes/1.5.0.3.txt[1.5.0.3],
371 link:RelNotes/1.5.0.2.txt[1.5.0.2],
372 link:RelNotes/1.5.0.1.txt[1.5.0.1],
373 link:RelNotes/1.5.0.txt[1.5.0].
2ff3f61a
JH
374
375* documentation for release link:v1.4.4.4/git.html[1.4.4.4],
376 link:v1.3.3/git.html[1.3.3],
377 link:v1.2.6/git.html[1.2.6],
378 link:v1.0.13/git.html[1.0.13].
26cfcfbf
JH
379
380============
381
382endif::stalenotes[]
383
cb22bc44
AE
384OPTIONS
385-------
386--version::
2de9b711 387 Prints the Git suite version that the 'git' program came from.
cb22bc44
AE
388
389--help::
a87cd02c 390 Prints the synopsis and a list of the most commonly used
0f6f195b 391 commands. If the option '--all' or '-a' is given then all
2de9b711 392 available commands are printed. If a Git command is named this
0f6f195b 393 option will bring up the manual page for that command.
45533d26
CC
394+
395Other options are available to control how the manual page is
5162e697 396displayed. See linkgit:git-help[1] for more information,
db5d6666
JN
397because `git --help ...` is converted internally into `git
398help ...`.
cb22bc44 399
8b1fa778
AR
400-c <name>=<value>::
401 Pass a configuration parameter to the command. The value
402 given will override values from configuration files.
403 The <name> is expected in the same format as listed by
404 'git config' (subkeys separated by dots).
405
62b4698e 406--exec-path[=<path>]::
2de9b711 407 Path to wherever your core Git programs are installed.
cb22bc44 408 This can also be controlled by setting the GIT_EXEC_PATH
56992f76 409 environment variable. If no path is given, 'git' will print
cb22bc44
AE
410 the current setting and then exit.
411
89a56bfb 412--html-path::
2de9b711 413 Print the path, without trailing slash, where Git's HTML
239b5ed9 414 documentation is installed and exit.
89a56bfb 415
f2dd8c37 416--man-path::
239b5ed9 417 Print the manpath (see `man(1)`) for the man pages for
2de9b711 418 this version of Git and exit.
f2dd8c37
JS
419
420--info-path::
239b5ed9 421 Print the path where the Info files documenting this
2de9b711 422 version of Git are installed and exit.
89a56bfb 423
3240240f
SB
424-p::
425--paginate::
06300d97
JN
426 Pipe all output into 'less' (or if set, $PAGER) if standard
427 output is a terminal. This overrides the `pager.<cmd>`
428 configuration options (see the "Configuration Mechanism" section
429 below).
6acbcb92 430
463a849d 431--no-pager::
2de9b711 432 Do not pipe Git output into a pager.
463a849d 433
6acbcb92
JS
434--git-dir=<path>::
435 Set the path to the repository. This can also be controlled by
302cc11a
LY
436 setting the GIT_DIR environment variable. It can be an absolute
437 path or relative path to current working directory.
6acbcb92 438
892c41b9 439--work-tree=<path>::
ea472c1e
JH
440 Set the path to the working tree. It can be an absolute path
441 or a path relative to the current working directory.
892c41b9
ML
442 This can also be controlled by setting the GIT_WORK_TREE
443 environment variable and the core.worktree configuration
ea472c1e
JH
444 variable (see core.worktree in linkgit:git-config[1] for a
445 more detailed discussion).
892c41b9 446
d49483f0 447--namespace=<path>::
2de9b711 448 Set the Git namespace. See linkgit:gitnamespaces[7] for more
d49483f0
JT
449 details. Equivalent to setting the `GIT_NAMESPACE` environment
450 variable.
451
6acbcb92 452--bare::
9277d602
JH
453 Treat the repository as a bare repository. If GIT_DIR
454 environment is not set, it is set to the current working
455 directory.
456
b0fa7ab5 457--no-replace-objects::
2de9b711 458 Do not use replacement refs to replace Git objects. See
b0fa7ab5
CC
459 linkgit:git-replace[1] for more information.
460
823ab40f
JK
461--literal-pathspecs::
462 Treat pathspecs literally, rather than as glob patterns. This is
463 equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
464 variable to `1`.
465
9755afbd 466
23091e95
BF
467GIT COMMANDS
468------------
9755afbd 469
2de9b711 470We divide Git into high level ("porcelain") commands and low level
23091e95 471("plumbing") commands.
8b15e2fb 472
23091e95
BF
473High-level commands (porcelain)
474-------------------------------
475
476We separate the porcelain commands into the main commands and some
477ancillary user utilities.
478
479Main porcelain commands
480~~~~~~~~~~~~~~~~~~~~~~~
905197de 481
377e8139 482include::cmds-mainporcelain.txt[]
e31bb3bb 483
90933efb 484Ancillary Commands
23091e95 485~~~~~~~~~~~~~~~~~~
2f2de9b4
JH
486Manipulators:
487
377e8139 488include::cmds-ancillarymanipulators.txt[]
204ee6a9 489
90933efb 490Interrogators:
204ee6a9 491
377e8139 492include::cmds-ancillaryinterrogators.txt[]
7fc9d69f 493
89bf2077
JH
494
495Interacting with Others
496~~~~~~~~~~~~~~~~~~~~~~~
497
498These commands are to interact with foreign SCM and with other
499people via patch over e-mail.
500
501include::cmds-foreignscminterface.txt[]
502
503
b1f33d62
RR
504Low-level commands (plumbing)
505-----------------------------
506
2de9b711 507Although Git includes its
b1f33d62
RR
508own porcelain layer, its low-level commands are sufficient to support
509development of alternative porcelains. Developers of such porcelains
5162e697
DM
510might start by reading about linkgit:git-update-index[1] and
511linkgit:git-read-tree[1].
b1f33d62 512
89bf2077
JH
513The interface (input, output, set of options and the semantics)
514to these low-level commands are meant to be a lot more stable
515than Porcelain level commands, because these commands are
516primarily for scripted use. The interface to Porcelain commands
517on the other hand are subject to change in order to improve the
518end user experience.
519
520The following description divides
521the low-level commands into commands that manipulate objects (in
b1f33d62
RR
522the repository, index, and working tree), commands that interrogate and
523compare objects, and commands that move objects and references between
524repositories.
525
89bf2077 526
b1f33d62
RR
527Manipulation commands
528~~~~~~~~~~~~~~~~~~~~~
b1f33d62 529
377e8139 530include::cmds-plumbingmanipulators.txt[]
b1f33d62
RR
531
532
533Interrogation commands
534~~~~~~~~~~~~~~~~~~~~~~
535
377e8139 536include::cmds-plumbinginterrogators.txt[]
b1f33d62
RR
537
538In general, the interrogate commands do not touch the files in
539the working tree.
540
541
542Synching repositories
543~~~~~~~~~~~~~~~~~~~~~
544
377e8139 545include::cmds-synchingrepositories.txt[]
b1f33d62 546
57f6ec02 547The following are helper commands used by the above; end users
89bf2077
JH
548typically do not use them directly.
549
550include::cmds-synchelpers.txt[]
551
552
553Internal helper commands
554~~~~~~~~~~~~~~~~~~~~~~~~
555
556These are internal helper commands used by other commands; end
557users typically do not use them directly.
558
559include::cmds-purehelpers.txt[]
560
b1f33d62 561
5773c9f2
JH
562Configuration Mechanism
563-----------------------
564
c0179c0d
MM
565Git uses a simple text format to store customizations that are per
566repository and are per user. Such a configuration file may look
567like this:
5773c9f2
JH
568
569------------
570#
2fa090b6 571# A '#' or ';' character indicates a comment.
5773c9f2
JH
572#
573
574; core variables
575[core]
576 ; Don't trust file modes
577 filemode = false
578
579; user identity
580[user]
581 name = "Junio C Hamano"
c0179c0d 582 email = "gitster@pobox.com"
5773c9f2
JH
583
584------------
585
586Various commands read from the configuration file and adjust
06300d97 587their operation accordingly. See linkgit:git-config[1] for a
c0179c0d 588list and more details about the configuration mechanism.
5773c9f2
JH
589
590
6c84e2e0 591Identifier Terminology
2cf565c5
DG
592----------------------
593<object>::
2fa090b6 594 Indicates the object name for any type of object.
2cf565c5
DG
595
596<blob>::
2fa090b6 597 Indicates a blob object name.
2cf565c5
DG
598
599<tree>::
2fa090b6 600 Indicates a tree object name.
2cf565c5
DG
601
602<commit>::
2fa090b6 603 Indicates a commit object name.
2cf565c5
DG
604
605<tree-ish>::
2fa090b6 606 Indicates a tree, commit or tag object name. A
6c84e2e0
DG
607 command that takes a <tree-ish> argument ultimately wants to
608 operate on a <tree> object but automatically dereferences
609 <commit> and <tag> objects that point at a <tree>.
2cf565c5 610
043d7605
TT
611<commit-ish>::
612 Indicates a commit or tag object name. A
613 command that takes a <commit-ish> argument ultimately wants to
614 operate on a <commit> object but automatically dereferences
615 <tag> objects that point at a <commit>.
616
2cf565c5
DG
617<type>::
618 Indicates that an object type is required.
2fa090b6 619 Currently one of: `blob`, `tree`, `commit`, or `tag`.
2cf565c5
DG
620
621<file>::
2fa090b6
JH
622 Indicates a filename - almost always relative to the
623 root of the tree structure `GIT_INDEX_FILE` describes.
2cf565c5 624
c1bdacf9
DG
625Symbolic Identifiers
626--------------------
2de9b711 627Any Git command accepting any <object> can also use the following
6c84e2e0 628symbolic notation:
c1bdacf9
DG
629
630HEAD::
0abcfbff 631 indicates the head of the current branch.
2fa090b6 632
c1bdacf9 633<tag>::
2fa090b6 634 a valid tag 'name'
0abcfbff 635 (i.e. a `refs/tags/<tag>` reference).
2fa090b6 636
c1bdacf9 637<head>::
2fa090b6 638 a valid head 'name'
0abcfbff 639 (i.e. a `refs/heads/<head>` reference).
2fa090b6 640
d47107d8 641For a more complete list of ways to spell object names, see
9d83e382 642"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
d47107d8 643
c1bdacf9
DG
644
645File/Directory Structure
646------------------------
c1bdacf9 647
6998e4db 648Please see the linkgit:gitrepository-layout[5] document.
c1bdacf9 649
6998e4db 650Read linkgit:githooks[5] for more details about each hook.
6250ad1e 651
c1bdacf9 652Higher level SCMs may provide and manage additional information in the
2fa090b6 653`$GIT_DIR`.
c1bdacf9 654
a1d4aa74 655
2cf565c5
DG
656Terminology
657-----------
6998e4db 658Please see linkgit:gitglossary[7].
2cf565c5
DG
659
660
661Environment Variables
662---------------------
2de9b711 663Various Git commands use the following environment variables:
2cf565c5 664
2de9b711 665The Git Repository
c1bdacf9 666~~~~~~~~~~~~~~~~~~
2de9b711 667These environment variables apply to 'all' core Git commands. Nb: it
c1bdacf9 668is worth noting that they may be used/overridden by SCMS sitting above
2de9b711 669Git so take care if using Cogito etc.
c1bdacf9
DG
670
671'GIT_INDEX_FILE'::
672 This environment allows the specification of an alternate
5f3aa197
LS
673 index file. If not specified, the default of `$GIT_DIR/index`
674 is used.
c1bdacf9
DG
675
676'GIT_OBJECT_DIRECTORY'::
677 If the object storage directory is specified via this
678 environment variable then the sha1 directories are created
679 underneath - otherwise the default `$GIT_DIR/objects`
680 directory is used.
681
682'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
2de9b711 683 Due to the immutable nature of Git objects, old objects can be
c1bdacf9 684 archived into shared, read-only directories. This variable
80ba074f 685 specifies a ":" separated (on Windows ";" separated) list
2de9b711 686 of Git object directories which can be used to search for Git
80ba074f 687 objects. New objects will not be written to these directories.
c1bdacf9
DG
688
689'GIT_DIR'::
2fa090b6
JH
690 If the 'GIT_DIR' environment variable is set then it
691 specifies a path to use instead of the default `.git`
692 for the base of the repository.
75940a00 693 The '--git-dir' command-line option also sets this value.
c1bdacf9 694
892c41b9 695'GIT_WORK_TREE'::
a758a349 696 Set the path to the root of the working tree.
892c41b9
ML
697 This can also be controlled by the '--work-tree' command line
698 option and the core.worktree configuration variable.
699
d49483f0 700'GIT_NAMESPACE'::
2de9b711 701 Set the Git namespace; see linkgit:gitnamespaces[7] for details.
d49483f0
JT
702 The '--namespace' command-line option also sets this value.
703
0454dd93 704'GIT_CEILING_DIRECTORIES'::
7ec30aaa 705 This should be a colon-separated list of absolute paths. If
3e07d268 706 set, it is a list of directories that Git should not chdir up
7ec30aaa
MH
707 into while looking for a repository directory (useful for
708 excluding slow-loading network directories). It will not
709 exclude the current working directory or a GIT_DIR set on the
710 command line or in the environment. Normally, Git has to read
711 the entries in this list and resolve any symlink that
712 might be present in order to compare them with the current
713 directory. However, if even this access is slow, you
714 can add an empty entry to the list to tell Git that the
715 subsequent entries are not symlinks and needn't be resolved;
716 e.g.,
717 'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
0454dd93 718
cf87463e 719'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
e6405517 720 When run in a directory that does not have ".git" repository
2de9b711 721 directory, Git tries to find such a directory in the parent
e6405517
JH
722 directories to find the top of the working tree, but by default it
723 does not cross filesystem boundaries. This environment variable
2de9b711 724 can be set to true to tell Git not to stop at filesystem
cf87463e
JH
725 boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
726 an explicit repository directory set via 'GIT_DIR' or on the
727 command line.
8030e442 728
2de9b711 729Git Commits
c1bdacf9
DG
730~~~~~~~~~~~
731'GIT_AUTHOR_NAME'::
732'GIT_AUTHOR_EMAIL'::
733'GIT_AUTHOR_DATE'::
734'GIT_COMMITTER_NAME'::
735'GIT_COMMITTER_EMAIL'::
4e58bf97 736'GIT_COMMITTER_DATE'::
28a94f88 737'EMAIL'::
5162e697 738 see linkgit:git-commit-tree[1]
c1bdacf9 739
2de9b711 740Git Diffs
c1bdacf9 741~~~~~~~~~
d81ed1b5 742'GIT_DIFF_OPTS'::
fde97d8a
SE
743 Only valid setting is "--unified=??" or "-u??" to set the
744 number of context lines shown when a unified diff is created.
745 This takes precedence over any "-U" or "--unified" option
2de9b711 746 value passed on the Git diff command line.
fde97d8a 747
d81ed1b5 748'GIT_EXTERNAL_DIFF'::
fde97d8a
SE
749 When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
750 program named by it is called, instead of the diff invocation
751 described above. For a path that is added, removed, or modified,
752 'GIT_EXTERNAL_DIFF' is called with 7 parameters:
753
754 path old-file old-hex old-mode new-file new-hex new-mode
755+
756where:
757
758 <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
759 contents of <old|new>,
d5fa1f1a 760 <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
fde97d8a 761 <old|new>-mode:: are the octal representation of the file modes.
fde97d8a
SE
762+
763The file parameters can point at the user's working file
764(e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
765when a new file is added), or a temporary file (e.g. `old-file` in the
766index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
767temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
768+
769For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
770parameter, <path>.
2cf565c5 771
575ba9d6
ML
772other
773~~~~~
dbddb714
JN
774'GIT_MERGE_VERBOSITY'::
775 A number controlling the amount of output shown by
776 the recursive merge strategy. Overrides merge.verbosity.
5162e697 777 See linkgit:git-merge[1]
dbddb714 778
c27d205a 779'GIT_PAGER'::
a7738c77 780 This environment variable overrides `$PAGER`. If it is set
2de9b711 781 to an empty string or to the value "cat", Git will not launch
ab54cd6c
JN
782 a pager. See also the `core.pager` option in
783 linkgit:git-config[1].
c27d205a 784
36384c97
RSM
785'GIT_EDITOR'::
786 This environment variable overrides `$EDITOR` and `$VISUAL`.
2de9b711 787 It is used by several Git commands when, on interactive mode,
36384c97
RSM
788 an editor is to be launched. See also linkgit:git-var[1]
789 and the `core.editor` option in linkgit:git-config[1].
790
d5538b41 791'GIT_SSH'::
0b444cdb
TR
792 If this environment variable is set then 'git fetch'
793 and 'git push' will use this command instead
2fd02c92 794 of 'ssh' when they need to connect to a remote system.
e39c695d
DB
795 The '$GIT_SSH' command will be given exactly two or
796 four arguments: the 'username@host' (or just 'host')
797 from the URL and the shell command to execute on that
798 remote system, optionally preceded by '-p' (literally) and
799 the 'port' from the URL when it specifies something other
800 than the default SSH port.
d5538b41
SP
801+
802To pass options to the program that you want to list in GIT_SSH
803you will need to wrap the program and options into a shell script,
804then set GIT_SSH to refer to the shell script.
805+
806Usually it is easier to configure any desired options through your
807personal `.ssh/config` file. Please consult your ssh documentation
808for further details.
809
453842c9 810'GIT_ASKPASS'::
2de9b711 811 If this environment variable is set, then Git commands which need to
453842c9
KF
812 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
813 will call this program with a suitable prompt as command line argument
814 and read the password from its STDOUT. See also the 'core.askpass'
815 option in linkgit:git-config[1].
816
e8ef401c
JN
817'GIT_CONFIG_NOSYSTEM'::
818 Whether to skip reading settings from the system-wide
819 `$(prefix)/etc/gitconfig` file. This environment variable can
820 be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
821 predictable environment for a picky script, or you can set it
822 temporarily to avoid using a buggy `/etc/gitconfig` file while
823 waiting for someone with sufficient permissions to fix it.
824
06f59e9f
TT
825'GIT_FLUSH'::
826 If this environment variable is set to "1", then commands such
0b444cdb 827 as 'git blame' (in incremental mode), 'git rev-list', 'git log',
f1ed7fea
AS
828 'git check-attr', 'git check-ignore', and 'git whatchanged' will
829 force a flush of the output stream after each record have been
830 flushed. If this
06f59e9f
TT
831 variable is set to "0", the output of these commands will be done
832 using completely buffered I/O. If this environment variable is
2de9b711 833 not set, Git will choose buffered or record-oriented flushing
06f59e9f
TT
834 based on whether stdout appears to be redirected to a file or not.
835
575ba9d6 836'GIT_TRACE'::
2886bdb1 837 If this variable is set to "1", "2" or "true" (comparison
2de9b711 838 is case insensitive), Git will print `trace:` messages on
575ba9d6
ML
839 stderr telling about alias expansion, built-in command
840 execution and external command execution.
2886bdb1 841 If this variable is set to an integer value greater than 1
2de9b711 842 and lower than 10 (strictly) then Git will interpret this
2886bdb1
CC
843 value as an open file descriptor and will try to write the
844 trace messages into this file descriptor.
845 Alternatively, if this variable is set to an absolute path
2de9b711 846 (starting with a '/' character), Git will interpret this
2886bdb1
CC
847 as a file path and will try to write the trace messages
848 into it.
575ba9d6 849
b12ca963
NTND
850'GIT_TRACE_PACK_ACCESS'::
851 If this variable is set to a path, a file will be created at
852 the given path logging all accesses to any packs. For each
853 access, the pack file name and an offset in the pack is
854 recorded. This may be helpful for troubleshooting some
855 pack-related performance problems.
856
1dd278ce
NTND
857'GIT_TRACE_PACKET'::
858 If this variable is set, it shows a trace of all packets
859 coming in or out of a given program. This can help with
860 debugging object negotiation or other protocol issues. Tracing
861 is turned off at a packet starting with "PACK".
862
823ab40f 863GIT_LITERAL_PATHSPECS::
2de9b711 864 Setting this variable to `1` will cause Git to treat all
823ab40f
JK
865 pathspecs literally, rather than as glob patterns. For example,
866 running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
867 for commits that touch the path `*.c`, not any paths that the
868 glob `*.c` matches. You might want this if you are feeding
2de9b711 869 literal paths to Git (e.g., paths previously given to you by
823ab40f
JK
870 `git ls-tree`, `--raw` diff output, etc).
871
872
8db9307c
JH
873Discussion[[Discussion]]
874------------------------
40dac517
BF
875
876More detail on the following is available from the
2de9b711 877link:user-manual.html#git-concepts[Git concepts chapter of the
6998e4db 878user-manual] and linkgit:gitcore-tutorial[7].
40dac517 879
2de9b711 880A Git project normally consists of a working directory with a ".git"
40dac517
BF
881subdirectory at the top level. The .git directory contains, among other
882things, a compressed object database representing the complete history
883of the project, an "index" file which links that history to the current
884contents of the working tree, and named pointers into that history such
885as tags and branch heads.
886
887The object database contains objects of three main types: blobs, which
888hold file data; trees, which point to blobs and other trees to build up
02ff6250 889directory hierarchies; and commits, which each reference a single tree
40dac517
BF
890and some number of parent commits.
891
892The commit, equivalent to what other systems call a "changeset" or
893"version", represents a step in the project's history, and each parent
894represents an immediately preceding step. Commits with more than one
895parent represent merges of independent lines of development.
896
d5fa1f1a 897All objects are named by the SHA-1 hash of their contents, normally
40dac517
BF
898written as a string of 40 hex digits. Such names are globally unique.
899The entire history leading up to a commit can be vouched for by signing
900just that commit. A fourth object type, the tag, is provided for this
901purpose.
902
903When first created, objects are stored in individual files, but for
904efficiency may later be compressed together into "pack files".
905
906Named pointers called refs mark interesting points in history. A ref
d5fa1f1a
TA
907may contain the SHA-1 name of an object or the name of another ref. Refs
908with names beginning `ref/head/` contain the SHA-1 name of the most
909recent commit (or "head") of a branch under development. SHA-1 names of
40dac517
BF
910tags of interest are stored under `ref/tags/`. A special ref named
911`HEAD` contains the name of the currently checked-out branch.
912
913The index file is initialized with a list of all paths and, for each
914path, a blob object and a set of attributes. The blob object represents
915the contents of the file as of the head of the current branch. The
916attributes (last modified time, size, etc.) are taken from the
917corresponding file in the working tree. Subsequent changes to the
918working tree can be found by comparing these attributes. The index may
919be updated with new content, and new commits may be created from the
920content stored in the index.
921
922The index is also capable of storing multiple entries (called "stages")
923for a given pathname. These stages are used to hold the various
924unmerged version of a file when a merge is in progress.
6c84e2e0 925
7687ae98
JH
926FURTHER DOCUMENTATION
927---------------------
928
929See the references in the "description" section to get started
2de9b711 930using Git. The following is probably more detail than necessary
7687ae98
JH
931for a first-time user.
932
2de9b711 933The link:user-manual.html#git-concepts[Git concepts chapter of the
7687ae98 934user-manual] and linkgit:gitcore-tutorial[7] both provide
2de9b711 935introductions to the underlying Git architecture.
7687ae98
JH
936
937See linkgit:gitworkflows[7] for an overview of recommended workflows.
938
939See also the link:howto-index.html[howto] documents for some useful
940examples.
941
942The internals are documented in the
48a8c26c 943link:technical/api-index.html[Git API documentation].
7687ae98
JH
944
945Users migrating from CVS may also want to
946read linkgit:gitcvs-migration[7].
947
948
cb22bc44
AE
949Authors
950-------
48bb914e 951Git was started by Linus Torvalds, and is currently maintained by Junio
2de9b711 952C Hamano. Numerous contributions have come from the Git mailing list
6ecc01f2
JH
953<git@vger.kernel.org>. http://www.ohloh.net/p/git/contributors/summary
954gives you a more complete list of contributors.
955
956If you have a clone of git.git itself, the
d8f708f8
JK
957output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
958the authors for specific parts of the project.
2cf565c5 959
c97ca277
JH
960Reporting Bugs
961--------------
962
963Report bugs to the Git mailing list <git@vger.kernel.org> where the
964development and maintenance is primarily done. You do not have to be
965subscribed to the list to send a message there.
966
497c8331
CC
967SEE ALSO
968--------
969linkgit:gittutorial[7], linkgit:gittutorial-2[7],
5cbef01a 970link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
497c8331 971linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
801a011d
TR
972linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
973linkgit:gitworkflows[7]
497c8331 974
2cf565c5
DG
975GIT
976---
9e1f0a85 977Part of the linkgit:git[1] suite