Documentation: explain optional arguments better
[git.git] / Documentation / git.txt
blob2b39aa9f5153846884e4a280102e01f4aad357d1
1 git(1)
2 ======
4 NAME
5 ----
6 git - the stupid content tracker
9 SYNOPSIS
10 --------
11 [verse]
12 'git' [--version] [--help] [-C <path>] [-c <name>=<value>]
13     [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
14     [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
15     [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
16     <command> [<args>]
18 DESCRIPTION
19 -----------
20 Git is a fast, scalable, distributed revision control system with an
21 unusually rich command set that provides both high-level operations
22 and full access to internals.
24 See linkgit:gittutorial[7] to get started, then see
25 linkgit:giteveryday[7] for a useful minimum set of
26 commands.  The link:user-manual.html[Git User's Manual] has a more
27 in-depth introduction.
29 After you mastered the basic concepts, you can come back to this
30 page to learn what commands Git offers.  You can learn more about
31 individual Git commands with "git help command".  linkgit:gitcli[7]
32 manual page gives you an overview of the command-line command syntax.
34 Formatted and hyperlinked version of the latest Git documentation
35 can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
37 ifdef::stalenotes[]
38 [NOTE]
39 ============
41 You are reading the documentation for the latest (possibly
42 unreleased) version of Git, that is available from the 'master'
43 branch of the `git.git` repository.
44 Documentation for older releases are available here:
46 * link:v2.5.3/git.html[documentation for release 2.5.3]
48 * release notes for
49   link:RelNotes/2.5.3.txt[2.5.3],
50   link:RelNotes/2.5.2.txt[2.5.2],
51   link:RelNotes/2.5.1.txt[2.5.1],
52   link:RelNotes/2.5.0.txt[2.5].
54 * link:v2.4.9/git.html[documentation for release 2.4.9]
56 * release notes for
57   link:RelNotes/2.4.9.txt[2.4.9],
58   link:RelNotes/2.4.8.txt[2.4.8],
59   link:RelNotes/2.4.7.txt[2.4.7],
60   link:RelNotes/2.4.6.txt[2.4.6],
61   link:RelNotes/2.4.5.txt[2.4.5],
62   link:RelNotes/2.4.4.txt[2.4.4],
63   link:RelNotes/2.4.3.txt[2.4.3],
64   link:RelNotes/2.4.2.txt[2.4.2],
65   link:RelNotes/2.4.1.txt[2.4.1],
66   link:RelNotes/2.4.0.txt[2.4].
68 * link:v2.3.9/git.html[documentation for release 2.3.9]
70 * release notes for
71   link:RelNotes/2.3.9.txt[2.3.9],
72   link:RelNotes/2.3.8.txt[2.3.8],
73   link:RelNotes/2.3.7.txt[2.3.7],
74   link:RelNotes/2.3.6.txt[2.3.6],
75   link:RelNotes/2.3.5.txt[2.3.5],
76   link:RelNotes/2.3.4.txt[2.3.4],
77   link:RelNotes/2.3.3.txt[2.3.3],
78   link:RelNotes/2.3.2.txt[2.3.2],
79   link:RelNotes/2.3.1.txt[2.3.1],
80   link:RelNotes/2.3.0.txt[2.3].
82 * link:v2.2.3/git.html[documentation for release 2.2.3]
84 * release notes for
85   link:RelNotes/2.2.3.txt[2.2.3],
86   link:RelNotes/2.2.2.txt[2.2.2],
87   link:RelNotes/2.2.1.txt[2.2.1],
88   link:RelNotes/2.2.0.txt[2.2].
90 * link:v2.1.4/git.html[documentation for release 2.1.4]
92 * release notes for
93   link:RelNotes/2.1.4.txt[2.1.4],
94   link:RelNotes/2.1.3.txt[2.1.3],
95   link:RelNotes/2.1.2.txt[2.1.2],
96   link:RelNotes/2.1.1.txt[2.1.1],
97   link:RelNotes/2.1.0.txt[2.1].
99 * link:v2.0.5/git.html[documentation for release 2.0.5]
101 * release notes for
102   link:RelNotes/2.0.5.txt[2.0.5],
103   link:RelNotes/2.0.4.txt[2.0.4],
104   link:RelNotes/2.0.3.txt[2.0.3],
105   link:RelNotes/2.0.2.txt[2.0.2],
106   link:RelNotes/2.0.1.txt[2.0.1],
107   link:RelNotes/2.0.0.txt[2.0.0].
109 * link:v1.9.5/git.html[documentation for release 1.9.5]
111 * release notes for
112   link:RelNotes/1.9.5.txt[1.9.5],
113   link:RelNotes/1.9.4.txt[1.9.4],
114   link:RelNotes/1.9.3.txt[1.9.3],
115   link:RelNotes/1.9.2.txt[1.9.2],
116   link:RelNotes/1.9.1.txt[1.9.1],
117   link:RelNotes/1.9.0.txt[1.9.0].
119 * link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
121 * release notes for
122   link:RelNotes/1.8.5.6.txt[1.8.5.6],
123   link:RelNotes/1.8.5.5.txt[1.8.5.5],
124   link:RelNotes/1.8.5.4.txt[1.8.5.4],
125   link:RelNotes/1.8.5.3.txt[1.8.5.3],
126   link:RelNotes/1.8.5.2.txt[1.8.5.2],
127   link:RelNotes/1.8.5.1.txt[1.8.5.1],
128   link:RelNotes/1.8.5.txt[1.8.5].
130 * link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
132 * release notes for
133   link:RelNotes/1.8.4.5.txt[1.8.4.5],
134   link:RelNotes/1.8.4.4.txt[1.8.4.4],
135   link:RelNotes/1.8.4.3.txt[1.8.4.3],
136   link:RelNotes/1.8.4.2.txt[1.8.4.2],
137   link:RelNotes/1.8.4.1.txt[1.8.4.1],
138   link:RelNotes/1.8.4.txt[1.8.4].
140 * link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
142 * release notes for
143   link:RelNotes/1.8.3.4.txt[1.8.3.4],
144   link:RelNotes/1.8.3.3.txt[1.8.3.3],
145   link:RelNotes/1.8.3.2.txt[1.8.3.2],
146   link:RelNotes/1.8.3.1.txt[1.8.3.1],
147   link:RelNotes/1.8.3.txt[1.8.3].
149 * link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
151 * release notes for
152   link:RelNotes/1.8.2.3.txt[1.8.2.3],
153   link:RelNotes/1.8.2.2.txt[1.8.2.2],
154   link:RelNotes/1.8.2.1.txt[1.8.2.1],
155   link:RelNotes/1.8.2.txt[1.8.2].
157 * link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
159 * release notes for
160   link:RelNotes/1.8.1.6.txt[1.8.1.6],
161   link:RelNotes/1.8.1.5.txt[1.8.1.5],
162   link:RelNotes/1.8.1.4.txt[1.8.1.4],
163   link:RelNotes/1.8.1.3.txt[1.8.1.3],
164   link:RelNotes/1.8.1.2.txt[1.8.1.2],
165   link:RelNotes/1.8.1.1.txt[1.8.1.1],
166   link:RelNotes/1.8.1.txt[1.8.1].
168 * link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
170 * release notes for
171   link:RelNotes/1.8.0.3.txt[1.8.0.3],
172   link:RelNotes/1.8.0.2.txt[1.8.0.2],
173   link:RelNotes/1.8.0.1.txt[1.8.0.1],
174   link:RelNotes/1.8.0.txt[1.8.0].
176 * link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
178 * release notes for
179   link:RelNotes/1.7.12.4.txt[1.7.12.4],
180   link:RelNotes/1.7.12.3.txt[1.7.12.3],
181   link:RelNotes/1.7.12.2.txt[1.7.12.2],
182   link:RelNotes/1.7.12.1.txt[1.7.12.1],
183   link:RelNotes/1.7.12.txt[1.7.12].
185 * link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
187 * release notes for
188   link:RelNotes/1.7.11.7.txt[1.7.11.7],
189   link:RelNotes/1.7.11.6.txt[1.7.11.6],
190   link:RelNotes/1.7.11.5.txt[1.7.11.5],
191   link:RelNotes/1.7.11.4.txt[1.7.11.4],
192   link:RelNotes/1.7.11.3.txt[1.7.11.3],
193   link:RelNotes/1.7.11.2.txt[1.7.11.2],
194   link:RelNotes/1.7.11.1.txt[1.7.11.1],
195   link:RelNotes/1.7.11.txt[1.7.11].
197 * link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
199 * release notes for
200   link:RelNotes/1.7.10.5.txt[1.7.10.5],
201   link:RelNotes/1.7.10.4.txt[1.7.10.4],
202   link:RelNotes/1.7.10.3.txt[1.7.10.3],
203   link:RelNotes/1.7.10.2.txt[1.7.10.2],
204   link:RelNotes/1.7.10.1.txt[1.7.10.1],
205   link:RelNotes/1.7.10.txt[1.7.10].
207 * link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
209 * release notes for
210   link:RelNotes/1.7.9.7.txt[1.7.9.7],
211   link:RelNotes/1.7.9.6.txt[1.7.9.6],
212   link:RelNotes/1.7.9.5.txt[1.7.9.5],
213   link:RelNotes/1.7.9.4.txt[1.7.9.4],
214   link:RelNotes/1.7.9.3.txt[1.7.9.3],
215   link:RelNotes/1.7.9.2.txt[1.7.9.2],
216   link:RelNotes/1.7.9.1.txt[1.7.9.1],
217   link:RelNotes/1.7.9.txt[1.7.9].
219 * link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
221 * release notes for
222   link:RelNotes/1.7.8.6.txt[1.7.8.6],
223   link:RelNotes/1.7.8.5.txt[1.7.8.5],
224   link:RelNotes/1.7.8.4.txt[1.7.8.4],
225   link:RelNotes/1.7.8.3.txt[1.7.8.3],
226   link:RelNotes/1.7.8.2.txt[1.7.8.2],
227   link:RelNotes/1.7.8.1.txt[1.7.8.1],
228   link:RelNotes/1.7.8.txt[1.7.8].
230 * link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
232 * release notes for
233   link:RelNotes/1.7.7.7.txt[1.7.7.7],
234   link:RelNotes/1.7.7.6.txt[1.7.7.6],
235   link:RelNotes/1.7.7.5.txt[1.7.7.5],
236   link:RelNotes/1.7.7.4.txt[1.7.7.4],
237   link:RelNotes/1.7.7.3.txt[1.7.7.3],
238   link:RelNotes/1.7.7.2.txt[1.7.7.2],
239   link:RelNotes/1.7.7.1.txt[1.7.7.1],
240   link:RelNotes/1.7.7.txt[1.7.7].
242 * link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
244 * release notes for
245   link:RelNotes/1.7.6.6.txt[1.7.6.6],
246   link:RelNotes/1.7.6.5.txt[1.7.6.5],
247   link:RelNotes/1.7.6.4.txt[1.7.6.4],
248   link:RelNotes/1.7.6.3.txt[1.7.6.3],
249   link:RelNotes/1.7.6.2.txt[1.7.6.2],
250   link:RelNotes/1.7.6.1.txt[1.7.6.1],
251   link:RelNotes/1.7.6.txt[1.7.6].
253 * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
255 * release notes for
256   link:RelNotes/1.7.5.4.txt[1.7.5.4],
257   link:RelNotes/1.7.5.3.txt[1.7.5.3],
258   link:RelNotes/1.7.5.2.txt[1.7.5.2],
259   link:RelNotes/1.7.5.1.txt[1.7.5.1],
260   link:RelNotes/1.7.5.txt[1.7.5].
262 * link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
264 * release notes for
265   link:RelNotes/1.7.4.5.txt[1.7.4.5],
266   link:RelNotes/1.7.4.4.txt[1.7.4.4],
267   link:RelNotes/1.7.4.3.txt[1.7.4.3],
268   link:RelNotes/1.7.4.2.txt[1.7.4.2],
269   link:RelNotes/1.7.4.1.txt[1.7.4.1],
270   link:RelNotes/1.7.4.txt[1.7.4].
272 * link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
274 * release notes for
275   link:RelNotes/1.7.3.5.txt[1.7.3.5],
276   link:RelNotes/1.7.3.4.txt[1.7.3.4],
277   link:RelNotes/1.7.3.3.txt[1.7.3.3],
278   link:RelNotes/1.7.3.2.txt[1.7.3.2],
279   link:RelNotes/1.7.3.1.txt[1.7.3.1],
280   link:RelNotes/1.7.3.txt[1.7.3].
282 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
284 * release notes for
285   link:RelNotes/1.7.2.5.txt[1.7.2.5],
286   link:RelNotes/1.7.2.4.txt[1.7.2.4],
287   link:RelNotes/1.7.2.3.txt[1.7.2.3],
288   link:RelNotes/1.7.2.2.txt[1.7.2.2],
289   link:RelNotes/1.7.2.1.txt[1.7.2.1],
290   link:RelNotes/1.7.2.txt[1.7.2].
292 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
294 * release notes for
295   link:RelNotes/1.7.1.4.txt[1.7.1.4],
296   link:RelNotes/1.7.1.3.txt[1.7.1.3],
297   link:RelNotes/1.7.1.2.txt[1.7.1.2],
298   link:RelNotes/1.7.1.1.txt[1.7.1.1],
299   link:RelNotes/1.7.1.txt[1.7.1].
301 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
303 * release notes for
304   link:RelNotes/1.7.0.9.txt[1.7.0.9],
305   link:RelNotes/1.7.0.8.txt[1.7.0.8],
306   link:RelNotes/1.7.0.7.txt[1.7.0.7],
307   link:RelNotes/1.7.0.6.txt[1.7.0.6],
308   link:RelNotes/1.7.0.5.txt[1.7.0.5],
309   link:RelNotes/1.7.0.4.txt[1.7.0.4],
310   link:RelNotes/1.7.0.3.txt[1.7.0.3],
311   link:RelNotes/1.7.0.2.txt[1.7.0.2],
312   link:RelNotes/1.7.0.1.txt[1.7.0.1],
313   link:RelNotes/1.7.0.txt[1.7.0].
315 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
317 * release notes for
318   link:RelNotes/1.6.6.3.txt[1.6.6.3],
319   link:RelNotes/1.6.6.2.txt[1.6.6.2],
320   link:RelNotes/1.6.6.1.txt[1.6.6.1],
321   link:RelNotes/1.6.6.txt[1.6.6].
323 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
325 * release notes for
326   link:RelNotes/1.6.5.9.txt[1.6.5.9],
327   link:RelNotes/1.6.5.8.txt[1.6.5.8],
328   link:RelNotes/1.6.5.7.txt[1.6.5.7],
329   link:RelNotes/1.6.5.6.txt[1.6.5.6],
330   link:RelNotes/1.6.5.5.txt[1.6.5.5],
331   link:RelNotes/1.6.5.4.txt[1.6.5.4],
332   link:RelNotes/1.6.5.3.txt[1.6.5.3],
333   link:RelNotes/1.6.5.2.txt[1.6.5.2],
334   link:RelNotes/1.6.5.1.txt[1.6.5.1],
335   link:RelNotes/1.6.5.txt[1.6.5].
337 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
339 * release notes for
340   link:RelNotes/1.6.4.5.txt[1.6.4.5],
341   link:RelNotes/1.6.4.4.txt[1.6.4.4],
342   link:RelNotes/1.6.4.3.txt[1.6.4.3],
343   link:RelNotes/1.6.4.2.txt[1.6.4.2],
344   link:RelNotes/1.6.4.1.txt[1.6.4.1],
345   link:RelNotes/1.6.4.txt[1.6.4].
347 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
349 * release notes for
350   link:RelNotes/1.6.3.4.txt[1.6.3.4],
351   link:RelNotes/1.6.3.3.txt[1.6.3.3],
352   link:RelNotes/1.6.3.2.txt[1.6.3.2],
353   link:RelNotes/1.6.3.1.txt[1.6.3.1],
354   link:RelNotes/1.6.3.txt[1.6.3].
356 * release notes for
357   link:RelNotes/1.6.2.5.txt[1.6.2.5],
358   link:RelNotes/1.6.2.4.txt[1.6.2.4],
359   link:RelNotes/1.6.2.3.txt[1.6.2.3],
360   link:RelNotes/1.6.2.2.txt[1.6.2.2],
361   link:RelNotes/1.6.2.1.txt[1.6.2.1],
362   link:RelNotes/1.6.2.txt[1.6.2].
364 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
366 * release notes for
367   link:RelNotes/1.6.1.3.txt[1.6.1.3],
368   link:RelNotes/1.6.1.2.txt[1.6.1.2],
369   link:RelNotes/1.6.1.1.txt[1.6.1.1],
370   link:RelNotes/1.6.1.txt[1.6.1].
372 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
374 * release notes for
375   link:RelNotes/1.6.0.6.txt[1.6.0.6],
376   link:RelNotes/1.6.0.5.txt[1.6.0.5],
377   link:RelNotes/1.6.0.4.txt[1.6.0.4],
378   link:RelNotes/1.6.0.3.txt[1.6.0.3],
379   link:RelNotes/1.6.0.2.txt[1.6.0.2],
380   link:RelNotes/1.6.0.1.txt[1.6.0.1],
381   link:RelNotes/1.6.0.txt[1.6.0].
383 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
385 * release notes for
386   link:RelNotes/1.5.6.6.txt[1.5.6.6],
387   link:RelNotes/1.5.6.5.txt[1.5.6.5],
388   link:RelNotes/1.5.6.4.txt[1.5.6.4],
389   link:RelNotes/1.5.6.3.txt[1.5.6.3],
390   link:RelNotes/1.5.6.2.txt[1.5.6.2],
391   link:RelNotes/1.5.6.1.txt[1.5.6.1],
392   link:RelNotes/1.5.6.txt[1.5.6].
394 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
396 * release notes for
397   link:RelNotes/1.5.5.6.txt[1.5.5.6],
398   link:RelNotes/1.5.5.5.txt[1.5.5.5],
399   link:RelNotes/1.5.5.4.txt[1.5.5.4],
400   link:RelNotes/1.5.5.3.txt[1.5.5.3],
401   link:RelNotes/1.5.5.2.txt[1.5.5.2],
402   link:RelNotes/1.5.5.1.txt[1.5.5.1],
403   link:RelNotes/1.5.5.txt[1.5.5].
405 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
407 * release notes for
408   link:RelNotes/1.5.4.7.txt[1.5.4.7],
409   link:RelNotes/1.5.4.6.txt[1.5.4.6],
410   link:RelNotes/1.5.4.5.txt[1.5.4.5],
411   link:RelNotes/1.5.4.4.txt[1.5.4.4],
412   link:RelNotes/1.5.4.3.txt[1.5.4.3],
413   link:RelNotes/1.5.4.2.txt[1.5.4.2],
414   link:RelNotes/1.5.4.1.txt[1.5.4.1],
415   link:RelNotes/1.5.4.txt[1.5.4].
417 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
419 * release notes for
420   link:RelNotes/1.5.3.8.txt[1.5.3.8],
421   link:RelNotes/1.5.3.7.txt[1.5.3.7],
422   link:RelNotes/1.5.3.6.txt[1.5.3.6],
423   link:RelNotes/1.5.3.5.txt[1.5.3.5],
424   link:RelNotes/1.5.3.4.txt[1.5.3.4],
425   link:RelNotes/1.5.3.3.txt[1.5.3.3],
426   link:RelNotes/1.5.3.2.txt[1.5.3.2],
427   link:RelNotes/1.5.3.1.txt[1.5.3.1],
428   link:RelNotes/1.5.3.txt[1.5.3].
430 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
432 * release notes for
433   link:RelNotes/1.5.2.5.txt[1.5.2.5],
434   link:RelNotes/1.5.2.4.txt[1.5.2.4],
435   link:RelNotes/1.5.2.3.txt[1.5.2.3],
436   link:RelNotes/1.5.2.2.txt[1.5.2.2],
437   link:RelNotes/1.5.2.1.txt[1.5.2.1],
438   link:RelNotes/1.5.2.txt[1.5.2].
440 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
442 * release notes for
443   link:RelNotes/1.5.1.6.txt[1.5.1.6],
444   link:RelNotes/1.5.1.5.txt[1.5.1.5],
445   link:RelNotes/1.5.1.4.txt[1.5.1.4],
446   link:RelNotes/1.5.1.3.txt[1.5.1.3],
447   link:RelNotes/1.5.1.2.txt[1.5.1.2],
448   link:RelNotes/1.5.1.1.txt[1.5.1.1],
449   link:RelNotes/1.5.1.txt[1.5.1].
451 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
453 * release notes for
454   link:RelNotes/1.5.0.7.txt[1.5.0.7],
455   link:RelNotes/1.5.0.6.txt[1.5.0.6],
456   link:RelNotes/1.5.0.5.txt[1.5.0.5],
457   link:RelNotes/1.5.0.3.txt[1.5.0.3],
458   link:RelNotes/1.5.0.2.txt[1.5.0.2],
459   link:RelNotes/1.5.0.1.txt[1.5.0.1],
460   link:RelNotes/1.5.0.txt[1.5.0].
462 * documentation for release link:v1.4.4.4/git.html[1.4.4.4],
463   link:v1.3.3/git.html[1.3.3],
464   link:v1.2.6/git.html[1.2.6],
465   link:v1.0.13/git.html[1.0.13].
467 ============
469 endif::stalenotes[]
471 OPTIONS
472 -------
473 --version::
474         Prints the Git suite version that the 'git' program came from.
476 --help::
477         Prints the synopsis and a list of the most commonly used
478         commands. If the option '--all' or '-a' is given then all
479         available commands are printed. If a Git command is named this
480         option will bring up the manual page for that command.
482 Other options are available to control how the manual page is
483 displayed. See linkgit:git-help[1] for more information,
484 because `git --help ...` is converted internally into `git
485 help ...`.
487 -C <path>::
488         Run as if git was started in '<path>' instead of the current working
489         directory.  When multiple `-C` options are given, each subsequent
490         non-absolute `-C <path>` is interpreted relative to the preceding `-C
491         <path>`.
493 This option affects options that expect path name like `--git-dir` and
494 `--work-tree` in that their interpretations of the path names would be
495 made relative to the working directory caused by the `-C` option. For
496 example the following invocations are equivalent:
498     git --git-dir=a.git --work-tree=b -C c status
499     git --git-dir=c/a.git --work-tree=c/b status
501 -c <name>=<value>::
502         Pass a configuration parameter to the command. The value
503         given will override values from configuration files.
504         The <name> is expected in the same format as listed by
505         'git config' (subkeys separated by dots).
507 Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
508 `foo.bar` to the boolean true value (just like `[foo]bar` would in a
509 config file). Including the equals but with an empty value (like `git -c
510 foo.bar= ...`) sets `foo.bar` to the empty string.
512 --exec-path[=<path>]::
513         Path to wherever your core Git programs are installed.
514         This can also be controlled by setting the GIT_EXEC_PATH
515         environment variable. If no path is given, 'git' will print
516         the current setting and then exit.
518 --html-path::
519         Print the path, without trailing slash, where Git's HTML
520         documentation is installed and exit.
522 --man-path::
523         Print the manpath (see `man(1)`) for the man pages for
524         this version of Git and exit.
526 --info-path::
527         Print the path where the Info files documenting this
528         version of Git are installed and exit.
530 -p::
531 --paginate::
532         Pipe all output into 'less' (or if set, $PAGER) if standard
533         output is a terminal.  This overrides the `pager.<cmd>`
534         configuration options (see the "Configuration Mechanism" section
535         below).
537 --no-pager::
538         Do not pipe Git output into a pager.
540 --git-dir=<path>::
541         Set the path to the repository. This can also be controlled by
542         setting the GIT_DIR environment variable. It can be an absolute
543         path or relative path to current working directory.
545 --work-tree=<path>::
546         Set the path to the working tree. It can be an absolute path
547         or a path relative to the current working directory.
548         This can also be controlled by setting the GIT_WORK_TREE
549         environment variable and the core.worktree configuration
550         variable (see core.worktree in linkgit:git-config[1] for a
551         more detailed discussion).
553 --namespace=<path>::
554         Set the Git namespace.  See linkgit:gitnamespaces[7] for more
555         details.  Equivalent to setting the `GIT_NAMESPACE` environment
556         variable.
558 --bare::
559         Treat the repository as a bare repository.  If GIT_DIR
560         environment is not set, it is set to the current working
561         directory.
563 --no-replace-objects::
564         Do not use replacement refs to replace Git objects. See
565         linkgit:git-replace[1] for more information.
567 --literal-pathspecs::
568         Treat pathspecs literally (i.e. no globbing, no pathspec magic).
569         This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
570         variable to `1`.
572 --glob-pathspecs::
573         Add "glob" magic to all pathspec. This is equivalent to setting
574         the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
575         globbing on individual pathspecs can be done using pathspec
576         magic ":(literal)"
578 --noglob-pathspecs::
579         Add "literal" magic to all pathspec. This is equivalent to setting
580         the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
581         globbing on individual pathspecs can be done using pathspec
582         magic ":(glob)"
584 --icase-pathspecs::
585         Add "icase" magic to all pathspec. This is equivalent to setting
586         the `GIT_ICASE_PATHSPECS` environment variable to `1`.
588 GIT COMMANDS
589 ------------
591 We divide Git into high level ("porcelain") commands and low level
592 ("plumbing") commands.
594 High-level commands (porcelain)
595 -------------------------------
597 We separate the porcelain commands into the main commands and some
598 ancillary user utilities.
600 Main porcelain commands
601 ~~~~~~~~~~~~~~~~~~~~~~~
603 include::cmds-mainporcelain.txt[]
605 Ancillary Commands
606 ~~~~~~~~~~~~~~~~~~
607 Manipulators:
609 include::cmds-ancillarymanipulators.txt[]
611 Interrogators:
613 include::cmds-ancillaryinterrogators.txt[]
616 Interacting with Others
617 ~~~~~~~~~~~~~~~~~~~~~~~
619 These commands are to interact with foreign SCM and with other
620 people via patch over e-mail.
622 include::cmds-foreignscminterface.txt[]
625 Low-level commands (plumbing)
626 -----------------------------
628 Although Git includes its
629 own porcelain layer, its low-level commands are sufficient to support
630 development of alternative porcelains.  Developers of such porcelains
631 might start by reading about linkgit:git-update-index[1] and
632 linkgit:git-read-tree[1].
634 The interface (input, output, set of options and the semantics)
635 to these low-level commands are meant to be a lot more stable
636 than Porcelain level commands, because these commands are
637 primarily for scripted use.  The interface to Porcelain commands
638 on the other hand are subject to change in order to improve the
639 end user experience.
641 The following description divides
642 the low-level commands into commands that manipulate objects (in
643 the repository, index, and working tree), commands that interrogate and
644 compare objects, and commands that move objects and references between
645 repositories.
648 Manipulation commands
649 ~~~~~~~~~~~~~~~~~~~~~
651 include::cmds-plumbingmanipulators.txt[]
654 Interrogation commands
655 ~~~~~~~~~~~~~~~~~~~~~~
657 include::cmds-plumbinginterrogators.txt[]
659 In general, the interrogate commands do not touch the files in
660 the working tree.
663 Synching repositories
664 ~~~~~~~~~~~~~~~~~~~~~
666 include::cmds-synchingrepositories.txt[]
668 The following are helper commands used by the above; end users
669 typically do not use them directly.
671 include::cmds-synchelpers.txt[]
674 Internal helper commands
675 ~~~~~~~~~~~~~~~~~~~~~~~~
677 These are internal helper commands used by other commands; end
678 users typically do not use them directly.
680 include::cmds-purehelpers.txt[]
683 Configuration Mechanism
684 -----------------------
686 Git uses a simple text format to store customizations that are per
687 repository and are per user.  Such a configuration file may look
688 like this:
690 ------------
692 # A '#' or ';' character indicates a comment.
695 ; core variables
696 [core]
697         ; Don't trust file modes
698         filemode = false
700 ; user identity
701 [user]
702         name = "Junio C Hamano"
703         email = "gitster@pobox.com"
705 ------------
707 Various commands read from the configuration file and adjust
708 their operation accordingly.  See linkgit:git-config[1] for a
709 list and more details about the configuration mechanism.
712 Identifier Terminology
713 ----------------------
714 <object>::
715         Indicates the object name for any type of object.
717 <blob>::
718         Indicates a blob object name.
720 <tree>::
721         Indicates a tree object name.
723 <commit>::
724         Indicates a commit object name.
726 <tree-ish>::
727         Indicates a tree, commit or tag object name.  A
728         command that takes a <tree-ish> argument ultimately wants to
729         operate on a <tree> object but automatically dereferences
730         <commit> and <tag> objects that point at a <tree>.
732 <commit-ish>::
733         Indicates a commit or tag object name.  A
734         command that takes a <commit-ish> argument ultimately wants to
735         operate on a <commit> object but automatically dereferences
736         <tag> objects that point at a <commit>.
738 <type>::
739         Indicates that an object type is required.
740         Currently one of: `blob`, `tree`, `commit`, or `tag`.
742 <file>::
743         Indicates a filename - almost always relative to the
744         root of the tree structure `GIT_INDEX_FILE` describes.
746 Symbolic Identifiers
747 --------------------
748 Any Git command accepting any <object> can also use the following
749 symbolic notation:
751 HEAD::
752         indicates the head of the current branch.
754 <tag>::
755         a valid tag 'name'
756         (i.e. a `refs/tags/<tag>` reference).
758 <head>::
759         a valid head 'name'
760         (i.e. a `refs/heads/<head>` reference).
762 For a more complete list of ways to spell object names, see
763 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
766 File/Directory Structure
767 ------------------------
769 Please see the linkgit:gitrepository-layout[5] document.
771 Read linkgit:githooks[5] for more details about each hook.
773 Higher level SCMs may provide and manage additional information in the
774 `$GIT_DIR`.
777 Terminology
778 -----------
779 Please see linkgit:gitglossary[7].
782 Environment Variables
783 ---------------------
784 Various Git commands use the following environment variables:
786 The Git Repository
787 ~~~~~~~~~~~~~~~~~~
788 These environment variables apply to 'all' core Git commands. Nb: it
789 is worth noting that they may be used/overridden by SCMS sitting above
790 Git so take care if using a foreign front-end.
792 'GIT_INDEX_FILE'::
793         This environment allows the specification of an alternate
794         index file. If not specified, the default of `$GIT_DIR/index`
795         is used.
797 'GIT_INDEX_VERSION'::
798         This environment variable allows the specification of an index
799         version for new repositories.  It won't affect existing index
800         files.  By default index file version 2 or 3 is used. See
801         linkgit:git-update-index[1] for more information.
803 'GIT_OBJECT_DIRECTORY'::
804         If the object storage directory is specified via this
805         environment variable then the sha1 directories are created
806         underneath - otherwise the default `$GIT_DIR/objects`
807         directory is used.
809 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
810         Due to the immutable nature of Git objects, old objects can be
811         archived into shared, read-only directories. This variable
812         specifies a ":" separated (on Windows ";" separated) list
813         of Git object directories which can be used to search for Git
814         objects. New objects will not be written to these directories.
816 'GIT_DIR'::
817         If the 'GIT_DIR' environment variable is set then it
818         specifies a path to use instead of the default `.git`
819         for the base of the repository.
820         The '--git-dir' command-line option also sets this value.
822 'GIT_WORK_TREE'::
823         Set the path to the root of the working tree.
824         This can also be controlled by the '--work-tree' command-line
825         option and the core.worktree configuration variable.
827 'GIT_NAMESPACE'::
828         Set the Git namespace; see linkgit:gitnamespaces[7] for details.
829         The '--namespace' command-line option also sets this value.
831 'GIT_CEILING_DIRECTORIES'::
832         This should be a colon-separated list of absolute paths.  If
833         set, it is a list of directories that Git should not chdir up
834         into while looking for a repository directory (useful for
835         excluding slow-loading network directories).  It will not
836         exclude the current working directory or a GIT_DIR set on the
837         command line or in the environment.  Normally, Git has to read
838         the entries in this list and resolve any symlink that
839         might be present in order to compare them with the current
840         directory.  However, if even this access is slow, you
841         can add an empty entry to the list to tell Git that the
842         subsequent entries are not symlinks and needn't be resolved;
843         e.g.,
844         'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
846 'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
847         When run in a directory that does not have ".git" repository
848         directory, Git tries to find such a directory in the parent
849         directories to find the top of the working tree, but by default it
850         does not cross filesystem boundaries.  This environment variable
851         can be set to true to tell Git not to stop at filesystem
852         boundaries.  Like 'GIT_CEILING_DIRECTORIES', this will not affect
853         an explicit repository directory set via 'GIT_DIR' or on the
854         command line.
856 'GIT_COMMON_DIR'::
857         If this variable is set to a path, non-worktree files that are
858         normally in $GIT_DIR will be taken from this path
859         instead. Worktree-specific files such as HEAD or index are
860         taken from $GIT_DIR. See linkgit:gitrepository-layout[5] and
861         linkgit:git-worktree[1] for
862         details. This variable has lower precedence than other path
863         variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY...
865 Git Commits
866 ~~~~~~~~~~~
867 'GIT_AUTHOR_NAME'::
868 'GIT_AUTHOR_EMAIL'::
869 'GIT_AUTHOR_DATE'::
870 'GIT_COMMITTER_NAME'::
871 'GIT_COMMITTER_EMAIL'::
872 'GIT_COMMITTER_DATE'::
873 'EMAIL'::
874         see linkgit:git-commit-tree[1]
876 Git Diffs
877 ~~~~~~~~~
878 'GIT_DIFF_OPTS'::
879         Only valid setting is "--unified=??" or "-u??" to set the
880         number of context lines shown when a unified diff is created.
881         This takes precedence over any "-U" or "--unified" option
882         value passed on the Git diff command line.
884 'GIT_EXTERNAL_DIFF'::
885         When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
886         program named by it is called, instead of the diff invocation
887         described above.  For a path that is added, removed, or modified,
888         'GIT_EXTERNAL_DIFF' is called with 7 parameters:
890         path old-file old-hex old-mode new-file new-hex new-mode
892 where:
894         <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
895                          contents of <old|new>,
896         <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
897         <old|new>-mode:: are the octal representation of the file modes.
899 The file parameters can point at the user's working file
900 (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
901 when a new file is added), or a temporary file (e.g. `old-file` in the
902 index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the
903 temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
905 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
906 parameter, <path>.
908 For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
909 'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
911 'GIT_DIFF_PATH_COUNTER'::
912         A 1-based counter incremented by one for every path.
914 'GIT_DIFF_PATH_TOTAL'::
915         The total number of paths.
917 other
918 ~~~~~
919 'GIT_MERGE_VERBOSITY'::
920         A number controlling the amount of output shown by
921         the recursive merge strategy.  Overrides merge.verbosity.
922         See linkgit:git-merge[1]
924 'GIT_PAGER'::
925         This environment variable overrides `$PAGER`. If it is set
926         to an empty string or to the value "cat", Git will not launch
927         a pager.  See also the `core.pager` option in
928         linkgit:git-config[1].
930 'GIT_EDITOR'::
931         This environment variable overrides `$EDITOR` and `$VISUAL`.
932         It is used by several Git commands when, on interactive mode,
933         an editor is to be launched. See also linkgit:git-var[1]
934         and the `core.editor` option in linkgit:git-config[1].
936 'GIT_SSH'::
937 'GIT_SSH_COMMAND'::
938         If either of these environment variables is set then 'git fetch'
939         and 'git push' will use the specified command instead of 'ssh'
940         when they need to connect to a remote system.
941         The command will be given exactly two or four arguments: the
942         'username@host' (or just 'host') from the URL and the shell
943         command to execute on that remote system, optionally preceded by
944         '-p' (literally) and the 'port' from the URL when it specifies
945         something other than the default SSH port.
947 `$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
948 by the shell, which allows additional arguments to be included.
949 `$GIT_SSH` on the other hand must be just the path to a program
950 (which can be a wrapper shell script, if additional arguments are
951 needed).
953 Usually it is easier to configure any desired options through your
954 personal `.ssh/config` file.  Please consult your ssh documentation
955 for further details.
957 'GIT_ASKPASS'::
958         If this environment variable is set, then Git commands which need to
959         acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
960         will call this program with a suitable prompt as command-line argument
961         and read the password from its STDOUT. See also the 'core.askPass'
962         option in linkgit:git-config[1].
964 'GIT_TERMINAL_PROMPT'::
965         If this environment variable is set to `0`, git will not prompt
966         on the terminal (e.g., when asking for HTTP authentication).
968 'GIT_CONFIG_NOSYSTEM'::
969         Whether to skip reading settings from the system-wide
970         `$(prefix)/etc/gitconfig` file.  This environment variable can
971         be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
972         predictable environment for a picky script, or you can set it
973         temporarily to avoid using a buggy `/etc/gitconfig` file while
974         waiting for someone with sufficient permissions to fix it.
976 'GIT_FLUSH'::
977         If this environment variable is set to "1", then commands such
978         as 'git blame' (in incremental mode), 'git rev-list', 'git log',
979         'git check-attr' and 'git check-ignore' will
980         force a flush of the output stream after each record have been
981         flushed. If this
982         variable is set to "0", the output of these commands will be done
983         using completely buffered I/O.   If this environment variable is
984         not set, Git will choose buffered or record-oriented flushing
985         based on whether stdout appears to be redirected to a file or not.
987 'GIT_TRACE'::
988         Enables general trace messages, e.g. alias expansion, built-in
989         command execution and external command execution.
991 If this variable is set to "1", "2" or "true" (comparison
992 is case insensitive), trace messages will be printed to
993 stderr.
995 If the variable is set to an integer value greater than 2
996 and lower than 10 (strictly) then Git will interpret this
997 value as an open file descriptor and will try to write the
998 trace messages into this file descriptor.
1000 Alternatively, if the variable is set to an absolute path
1001 (starting with a '/' character), Git will interpret this
1002 as a file path and will try to write the trace messages
1003 into it.
1005 Unsetting the variable, or setting it to empty, "0" or
1006 "false" (case insensitive) disables trace messages.
1008 'GIT_TRACE_PACK_ACCESS'::
1009         Enables trace messages for all accesses to any packs. For each
1010         access, the pack file name and an offset in the pack is
1011         recorded. This may be helpful for troubleshooting some
1012         pack-related performance problems.
1013         See 'GIT_TRACE' for available trace output options.
1015 'GIT_TRACE_PACKET'::
1016         Enables trace messages for all packets coming in or out of a
1017         given program. This can help with debugging object negotiation
1018         or other protocol issues. Tracing is turned off at a packet
1019         starting with "PACK".
1020         See 'GIT_TRACE' for available trace output options.
1022 'GIT_TRACE_PERFORMANCE'::
1023         Enables performance related trace messages, e.g. total execution
1024         time of each Git command.
1025         See 'GIT_TRACE' for available trace output options.
1027 'GIT_TRACE_SETUP'::
1028         Enables trace messages printing the .git, working tree and current
1029         working directory after Git has completed its setup phase.
1030         See 'GIT_TRACE' for available trace output options.
1032 'GIT_TRACE_SHALLOW'::
1033         Enables trace messages that can help debugging fetching /
1034         cloning of shallow repositories.
1035         See 'GIT_TRACE' for available trace output options.
1037 GIT_LITERAL_PATHSPECS::
1038         Setting this variable to `1` will cause Git to treat all
1039         pathspecs literally, rather than as glob patterns. For example,
1040         running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
1041         for commits that touch the path `*.c`, not any paths that the
1042         glob `*.c` matches. You might want this if you are feeding
1043         literal paths to Git (e.g., paths previously given to you by
1044         `git ls-tree`, `--raw` diff output, etc).
1046 GIT_GLOB_PATHSPECS::
1047         Setting this variable to `1` will cause Git to treat all
1048         pathspecs as glob patterns (aka "glob" magic).
1050 GIT_NOGLOB_PATHSPECS::
1051         Setting this variable to `1` will cause Git to treat all
1052         pathspecs as literal (aka "literal" magic).
1054 GIT_ICASE_PATHSPECS::
1055         Setting this variable to `1` will cause Git to treat all
1056         pathspecs as case-insensitive.
1058 'GIT_REFLOG_ACTION'::
1059         When a ref is updated, reflog entries are created to keep
1060         track of the reason why the ref was updated (which is
1061         typically the name of the high-level command that updated
1062         the ref), in addition to the old and new values of the ref.
1063         A scripted Porcelain command can use set_reflog_action
1064         helper function in `git-sh-setup` to set its name to this
1065         variable when it is invoked as the top level command by the
1066         end user, to be recorded in the body of the reflog.
1068 `GIT_REF_PARANOIA`::
1069         If set to `1`, include broken or badly named refs when iterating
1070         over lists of refs. In a normal, non-corrupted repository, this
1071         does nothing. However, enabling it may help git to detect and
1072         abort some operations in the presence of broken refs. Git sets
1073         this variable automatically when performing destructive
1074         operations like linkgit:git-prune[1]. You should not need to set
1075         it yourself unless you want to be paranoid about making sure
1076         an operation has touched every ref (e.g., because you are
1077         cloning a repository to make a backup).
1080 Discussion[[Discussion]]
1081 ------------------------
1083 More detail on the following is available from the
1084 link:user-manual.html#git-concepts[Git concepts chapter of the
1085 user-manual] and linkgit:gitcore-tutorial[7].
1087 A Git project normally consists of a working directory with a ".git"
1088 subdirectory at the top level.  The .git directory contains, among other
1089 things, a compressed object database representing the complete history
1090 of the project, an "index" file which links that history to the current
1091 contents of the working tree, and named pointers into that history such
1092 as tags and branch heads.
1094 The object database contains objects of three main types: blobs, which
1095 hold file data; trees, which point to blobs and other trees to build up
1096 directory hierarchies; and commits, which each reference a single tree
1097 and some number of parent commits.
1099 The commit, equivalent to what other systems call a "changeset" or
1100 "version", represents a step in the project's history, and each parent
1101 represents an immediately preceding step.  Commits with more than one
1102 parent represent merges of independent lines of development.
1104 All objects are named by the SHA-1 hash of their contents, normally
1105 written as a string of 40 hex digits.  Such names are globally unique.
1106 The entire history leading up to a commit can be vouched for by signing
1107 just that commit.  A fourth object type, the tag, is provided for this
1108 purpose.
1110 When first created, objects are stored in individual files, but for
1111 efficiency may later be compressed together into "pack files".
1113 Named pointers called refs mark interesting points in history.  A ref
1114 may contain the SHA-1 name of an object or the name of another ref.  Refs
1115 with names beginning `ref/head/` contain the SHA-1 name of the most
1116 recent commit (or "head") of a branch under development.  SHA-1 names of
1117 tags of interest are stored under `ref/tags/`.  A special ref named
1118 `HEAD` contains the name of the currently checked-out branch.
1120 The index file is initialized with a list of all paths and, for each
1121 path, a blob object and a set of attributes.  The blob object represents
1122 the contents of the file as of the head of the current branch.  The
1123 attributes (last modified time, size, etc.) are taken from the
1124 corresponding file in the working tree.  Subsequent changes to the
1125 working tree can be found by comparing these attributes.  The index may
1126 be updated with new content, and new commits may be created from the
1127 content stored in the index.
1129 The index is also capable of storing multiple entries (called "stages")
1130 for a given pathname.  These stages are used to hold the various
1131 unmerged version of a file when a merge is in progress.
1133 FURTHER DOCUMENTATION
1134 ---------------------
1136 See the references in the "description" section to get started
1137 using Git.  The following is probably more detail than necessary
1138 for a first-time user.
1140 The link:user-manual.html#git-concepts[Git concepts chapter of the
1141 user-manual] and linkgit:gitcore-tutorial[7] both provide
1142 introductions to the underlying Git architecture.
1144 See linkgit:gitworkflows[7] for an overview of recommended workflows.
1146 See also the link:howto-index.html[howto] documents for some useful
1147 examples.
1149 The internals are documented in the
1150 link:technical/api-index.html[Git API documentation].
1152 Users migrating from CVS may also want to
1153 read linkgit:gitcvs-migration[7].
1156 Authors
1157 -------
1158 Git was started by Linus Torvalds, and is currently maintained by Junio
1159 C Hamano. Numerous contributions have come from the Git mailing list
1160 <git@vger.kernel.org>.  http://www.openhub.net/p/git/contributors/summary
1161 gives you a more complete list of contributors.
1163 If you have a clone of git.git itself, the
1164 output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1165 the authors for specific parts of the project.
1167 Reporting Bugs
1168 --------------
1170 Report bugs to the Git mailing list <git@vger.kernel.org> where the
1171 development and maintenance is primarily done.  You do not have to be
1172 subscribed to the list to send a message there.
1174 SEE ALSO
1175 --------
1176 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
1177 linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
1178 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
1179 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1180 linkgit:gitworkflows[7]
1184 Part of the linkgit:git[1] suite