Sync with 2.0.4
[git.git] / Documentation / git.txt
blobb1c4f7a56f485d04a9a31c0657e6d1291dd72160
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 link:everyday.html[Everyday Git] 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.0.4/git.html[documentation for release 2.0.4]
48 * release notes for
49   link:RelNotes/2.0.4.txt[2.0.4],
50   link:RelNotes/2.0.3.txt[2.0.3],
51   link:RelNotes/2.0.2.txt[2.0.2],
52   link:RelNotes/2.0.1.txt[2.0.1],
53   link:RelNotes/2.0.0.txt[2.0.0].
55 * link:v1.9.4/git.html[documentation for release 1.9.4]
57 * release notes for
58   link:RelNotes/1.9.4.txt[1.9.4],
59   link:RelNotes/1.9.3.txt[1.9.3],
60   link:RelNotes/1.9.2.txt[1.9.2],
61   link:RelNotes/1.9.1.txt[1.9.1],
62   link:RelNotes/1.9.0.txt[1.9.0].
64 * link:v1.8.5.5/git.html[documentation for release 1.8.5.5]
66 * release notes for
67   link:RelNotes/1.8.5.5.txt[1.8.5.5],
68   link:RelNotes/1.8.5.4.txt[1.8.5.4],
69   link:RelNotes/1.8.5.3.txt[1.8.5.3],
70   link:RelNotes/1.8.5.2.txt[1.8.5.2],
71   link:RelNotes/1.8.5.1.txt[1.8.5.1],
72   link:RelNotes/1.8.5.txt[1.8.5].
74 * link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
76 * release notes for
77   link:RelNotes/1.8.4.5.txt[1.8.4.5],
78   link:RelNotes/1.8.4.4.txt[1.8.4.4],
79   link:RelNotes/1.8.4.3.txt[1.8.4.3],
80   link:RelNotes/1.8.4.2.txt[1.8.4.2],
81   link:RelNotes/1.8.4.1.txt[1.8.4.1],
82   link:RelNotes/1.8.4.txt[1.8.4].
84 * link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
86 * release notes for
87   link:RelNotes/1.8.3.4.txt[1.8.3.4],
88   link:RelNotes/1.8.3.3.txt[1.8.3.3],
89   link:RelNotes/1.8.3.2.txt[1.8.3.2],
90   link:RelNotes/1.8.3.1.txt[1.8.3.1],
91   link:RelNotes/1.8.3.txt[1.8.3].
93 * link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
95 * release notes for
96   link:RelNotes/1.8.2.3.txt[1.8.2.3],
97   link:RelNotes/1.8.2.2.txt[1.8.2.2],
98   link:RelNotes/1.8.2.1.txt[1.8.2.1],
99   link:RelNotes/1.8.2.txt[1.8.2].
101 * link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
103 * release notes for
104   link:RelNotes/1.8.1.6.txt[1.8.1.6],
105   link:RelNotes/1.8.1.5.txt[1.8.1.5],
106   link:RelNotes/1.8.1.4.txt[1.8.1.4],
107   link:RelNotes/1.8.1.3.txt[1.8.1.3],
108   link:RelNotes/1.8.1.2.txt[1.8.1.2],
109   link:RelNotes/1.8.1.1.txt[1.8.1.1],
110   link:RelNotes/1.8.1.txt[1.8.1].
112 * link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
114 * release notes for
115   link:RelNotes/1.8.0.3.txt[1.8.0.3],
116   link:RelNotes/1.8.0.2.txt[1.8.0.2],
117   link:RelNotes/1.8.0.1.txt[1.8.0.1],
118   link:RelNotes/1.8.0.txt[1.8.0].
120 * link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
122 * release notes for
123   link:RelNotes/1.7.12.4.txt[1.7.12.4],
124   link:RelNotes/1.7.12.3.txt[1.7.12.3],
125   link:RelNotes/1.7.12.2.txt[1.7.12.2],
126   link:RelNotes/1.7.12.1.txt[1.7.12.1],
127   link:RelNotes/1.7.12.txt[1.7.12].
129 * link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
131 * release notes for
132   link:RelNotes/1.7.11.7.txt[1.7.11.7],
133   link:RelNotes/1.7.11.6.txt[1.7.11.6],
134   link:RelNotes/1.7.11.5.txt[1.7.11.5],
135   link:RelNotes/1.7.11.4.txt[1.7.11.4],
136   link:RelNotes/1.7.11.3.txt[1.7.11.3],
137   link:RelNotes/1.7.11.2.txt[1.7.11.2],
138   link:RelNotes/1.7.11.1.txt[1.7.11.1],
139   link:RelNotes/1.7.11.txt[1.7.11].
141 * link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
143 * release notes for
144   link:RelNotes/1.7.10.5.txt[1.7.10.5],
145   link:RelNotes/1.7.10.4.txt[1.7.10.4],
146   link:RelNotes/1.7.10.3.txt[1.7.10.3],
147   link:RelNotes/1.7.10.2.txt[1.7.10.2],
148   link:RelNotes/1.7.10.1.txt[1.7.10.1],
149   link:RelNotes/1.7.10.txt[1.7.10].
151 * link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
153 * release notes for
154   link:RelNotes/1.7.9.7.txt[1.7.9.7],
155   link:RelNotes/1.7.9.6.txt[1.7.9.6],
156   link:RelNotes/1.7.9.5.txt[1.7.9.5],
157   link:RelNotes/1.7.9.4.txt[1.7.9.4],
158   link:RelNotes/1.7.9.3.txt[1.7.9.3],
159   link:RelNotes/1.7.9.2.txt[1.7.9.2],
160   link:RelNotes/1.7.9.1.txt[1.7.9.1],
161   link:RelNotes/1.7.9.txt[1.7.9].
163 * link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
165 * release notes for
166   link:RelNotes/1.7.8.6.txt[1.7.8.6],
167   link:RelNotes/1.7.8.5.txt[1.7.8.5],
168   link:RelNotes/1.7.8.4.txt[1.7.8.4],
169   link:RelNotes/1.7.8.3.txt[1.7.8.3],
170   link:RelNotes/1.7.8.2.txt[1.7.8.2],
171   link:RelNotes/1.7.8.1.txt[1.7.8.1],
172   link:RelNotes/1.7.8.txt[1.7.8].
174 * link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
176 * release notes for
177   link:RelNotes/1.7.7.7.txt[1.7.7.7],
178   link:RelNotes/1.7.7.6.txt[1.7.7.6],
179   link:RelNotes/1.7.7.5.txt[1.7.7.5],
180   link:RelNotes/1.7.7.4.txt[1.7.7.4],
181   link:RelNotes/1.7.7.3.txt[1.7.7.3],
182   link:RelNotes/1.7.7.2.txt[1.7.7.2],
183   link:RelNotes/1.7.7.1.txt[1.7.7.1],
184   link:RelNotes/1.7.7.txt[1.7.7].
186 * link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
188 * release notes for
189   link:RelNotes/1.7.6.6.txt[1.7.6.6],
190   link:RelNotes/1.7.6.5.txt[1.7.6.5],
191   link:RelNotes/1.7.6.4.txt[1.7.6.4],
192   link:RelNotes/1.7.6.3.txt[1.7.6.3],
193   link:RelNotes/1.7.6.2.txt[1.7.6.2],
194   link:RelNotes/1.7.6.1.txt[1.7.6.1],
195   link:RelNotes/1.7.6.txt[1.7.6].
197 * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
199 * release notes for
200   link:RelNotes/1.7.5.4.txt[1.7.5.4],
201   link:RelNotes/1.7.5.3.txt[1.7.5.3],
202   link:RelNotes/1.7.5.2.txt[1.7.5.2],
203   link:RelNotes/1.7.5.1.txt[1.7.5.1],
204   link:RelNotes/1.7.5.txt[1.7.5].
206 * link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
208 * release notes for
209   link:RelNotes/1.7.4.5.txt[1.7.4.5],
210   link:RelNotes/1.7.4.4.txt[1.7.4.4],
211   link:RelNotes/1.7.4.3.txt[1.7.4.3],
212   link:RelNotes/1.7.4.2.txt[1.7.4.2],
213   link:RelNotes/1.7.4.1.txt[1.7.4.1],
214   link:RelNotes/1.7.4.txt[1.7.4].
216 * link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
218 * release notes for
219   link:RelNotes/1.7.3.5.txt[1.7.3.5],
220   link:RelNotes/1.7.3.4.txt[1.7.3.4],
221   link:RelNotes/1.7.3.3.txt[1.7.3.3],
222   link:RelNotes/1.7.3.2.txt[1.7.3.2],
223   link:RelNotes/1.7.3.1.txt[1.7.3.1],
224   link:RelNotes/1.7.3.txt[1.7.3].
226 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
228 * release notes for
229   link:RelNotes/1.7.2.5.txt[1.7.2.5],
230   link:RelNotes/1.7.2.4.txt[1.7.2.4],
231   link:RelNotes/1.7.2.3.txt[1.7.2.3],
232   link:RelNotes/1.7.2.2.txt[1.7.2.2],
233   link:RelNotes/1.7.2.1.txt[1.7.2.1],
234   link:RelNotes/1.7.2.txt[1.7.2].
236 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
238 * release notes for
239   link:RelNotes/1.7.1.4.txt[1.7.1.4],
240   link:RelNotes/1.7.1.3.txt[1.7.1.3],
241   link:RelNotes/1.7.1.2.txt[1.7.1.2],
242   link:RelNotes/1.7.1.1.txt[1.7.1.1],
243   link:RelNotes/1.7.1.txt[1.7.1].
245 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
247 * release notes for
248   link:RelNotes/1.7.0.9.txt[1.7.0.9],
249   link:RelNotes/1.7.0.8.txt[1.7.0.8],
250   link:RelNotes/1.7.0.7.txt[1.7.0.7],
251   link:RelNotes/1.7.0.6.txt[1.7.0.6],
252   link:RelNotes/1.7.0.5.txt[1.7.0.5],
253   link:RelNotes/1.7.0.4.txt[1.7.0.4],
254   link:RelNotes/1.7.0.3.txt[1.7.0.3],
255   link:RelNotes/1.7.0.2.txt[1.7.0.2],
256   link:RelNotes/1.7.0.1.txt[1.7.0.1],
257   link:RelNotes/1.7.0.txt[1.7.0].
259 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
261 * release notes for
262   link:RelNotes/1.6.6.3.txt[1.6.6.3],
263   link:RelNotes/1.6.6.2.txt[1.6.6.2],
264   link:RelNotes/1.6.6.1.txt[1.6.6.1],
265   link:RelNotes/1.6.6.txt[1.6.6].
267 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
269 * release notes for
270   link:RelNotes/1.6.5.9.txt[1.6.5.9],
271   link:RelNotes/1.6.5.8.txt[1.6.5.8],
272   link:RelNotes/1.6.5.7.txt[1.6.5.7],
273   link:RelNotes/1.6.5.6.txt[1.6.5.6],
274   link:RelNotes/1.6.5.5.txt[1.6.5.5],
275   link:RelNotes/1.6.5.4.txt[1.6.5.4],
276   link:RelNotes/1.6.5.3.txt[1.6.5.3],
277   link:RelNotes/1.6.5.2.txt[1.6.5.2],
278   link:RelNotes/1.6.5.1.txt[1.6.5.1],
279   link:RelNotes/1.6.5.txt[1.6.5].
281 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
283 * release notes for
284   link:RelNotes/1.6.4.5.txt[1.6.4.5],
285   link:RelNotes/1.6.4.4.txt[1.6.4.4],
286   link:RelNotes/1.6.4.3.txt[1.6.4.3],
287   link:RelNotes/1.6.4.2.txt[1.6.4.2],
288   link:RelNotes/1.6.4.1.txt[1.6.4.1],
289   link:RelNotes/1.6.4.txt[1.6.4].
291 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
293 * release notes for
294   link:RelNotes/1.6.3.4.txt[1.6.3.4],
295   link:RelNotes/1.6.3.3.txt[1.6.3.3],
296   link:RelNotes/1.6.3.2.txt[1.6.3.2],
297   link:RelNotes/1.6.3.1.txt[1.6.3.1],
298   link:RelNotes/1.6.3.txt[1.6.3].
300 * release notes for
301   link:RelNotes/1.6.2.5.txt[1.6.2.5],
302   link:RelNotes/1.6.2.4.txt[1.6.2.4],
303   link:RelNotes/1.6.2.3.txt[1.6.2.3],
304   link:RelNotes/1.6.2.2.txt[1.6.2.2],
305   link:RelNotes/1.6.2.1.txt[1.6.2.1],
306   link:RelNotes/1.6.2.txt[1.6.2].
308 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
310 * release notes for
311   link:RelNotes/1.6.1.3.txt[1.6.1.3],
312   link:RelNotes/1.6.1.2.txt[1.6.1.2],
313   link:RelNotes/1.6.1.1.txt[1.6.1.1],
314   link:RelNotes/1.6.1.txt[1.6.1].
316 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
318 * release notes for
319   link:RelNotes/1.6.0.6.txt[1.6.0.6],
320   link:RelNotes/1.6.0.5.txt[1.6.0.5],
321   link:RelNotes/1.6.0.4.txt[1.6.0.4],
322   link:RelNotes/1.6.0.3.txt[1.6.0.3],
323   link:RelNotes/1.6.0.2.txt[1.6.0.2],
324   link:RelNotes/1.6.0.1.txt[1.6.0.1],
325   link:RelNotes/1.6.0.txt[1.6.0].
327 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
329 * release notes for
330   link:RelNotes/1.5.6.6.txt[1.5.6.6],
331   link:RelNotes/1.5.6.5.txt[1.5.6.5],
332   link:RelNotes/1.5.6.4.txt[1.5.6.4],
333   link:RelNotes/1.5.6.3.txt[1.5.6.3],
334   link:RelNotes/1.5.6.2.txt[1.5.6.2],
335   link:RelNotes/1.5.6.1.txt[1.5.6.1],
336   link:RelNotes/1.5.6.txt[1.5.6].
338 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
340 * release notes for
341   link:RelNotes/1.5.5.6.txt[1.5.5.6],
342   link:RelNotes/1.5.5.5.txt[1.5.5.5],
343   link:RelNotes/1.5.5.4.txt[1.5.5.4],
344   link:RelNotes/1.5.5.3.txt[1.5.5.3],
345   link:RelNotes/1.5.5.2.txt[1.5.5.2],
346   link:RelNotes/1.5.5.1.txt[1.5.5.1],
347   link:RelNotes/1.5.5.txt[1.5.5].
349 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
351 * release notes for
352   link:RelNotes/1.5.4.7.txt[1.5.4.7],
353   link:RelNotes/1.5.4.6.txt[1.5.4.6],
354   link:RelNotes/1.5.4.5.txt[1.5.4.5],
355   link:RelNotes/1.5.4.4.txt[1.5.4.4],
356   link:RelNotes/1.5.4.3.txt[1.5.4.3],
357   link:RelNotes/1.5.4.2.txt[1.5.4.2],
358   link:RelNotes/1.5.4.1.txt[1.5.4.1],
359   link:RelNotes/1.5.4.txt[1.5.4].
361 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
363 * release notes for
364   link:RelNotes/1.5.3.8.txt[1.5.3.8],
365   link:RelNotes/1.5.3.7.txt[1.5.3.7],
366   link:RelNotes/1.5.3.6.txt[1.5.3.6],
367   link:RelNotes/1.5.3.5.txt[1.5.3.5],
368   link:RelNotes/1.5.3.4.txt[1.5.3.4],
369   link:RelNotes/1.5.3.3.txt[1.5.3.3],
370   link:RelNotes/1.5.3.2.txt[1.5.3.2],
371   link:RelNotes/1.5.3.1.txt[1.5.3.1],
372   link:RelNotes/1.5.3.txt[1.5.3].
374 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
376 * release notes for
377   link:RelNotes/1.5.2.5.txt[1.5.2.5],
378   link:RelNotes/1.5.2.4.txt[1.5.2.4],
379   link:RelNotes/1.5.2.3.txt[1.5.2.3],
380   link:RelNotes/1.5.2.2.txt[1.5.2.2],
381   link:RelNotes/1.5.2.1.txt[1.5.2.1],
382   link:RelNotes/1.5.2.txt[1.5.2].
384 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
386 * release notes for
387   link:RelNotes/1.5.1.6.txt[1.5.1.6],
388   link:RelNotes/1.5.1.5.txt[1.5.1.5],
389   link:RelNotes/1.5.1.4.txt[1.5.1.4],
390   link:RelNotes/1.5.1.3.txt[1.5.1.3],
391   link:RelNotes/1.5.1.2.txt[1.5.1.2],
392   link:RelNotes/1.5.1.1.txt[1.5.1.1],
393   link:RelNotes/1.5.1.txt[1.5.1].
395 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
397 * release notes for
398   link:RelNotes/1.5.0.7.txt[1.5.0.7],
399   link:RelNotes/1.5.0.6.txt[1.5.0.6],
400   link:RelNotes/1.5.0.5.txt[1.5.0.5],
401   link:RelNotes/1.5.0.3.txt[1.5.0.3],
402   link:RelNotes/1.5.0.2.txt[1.5.0.2],
403   link:RelNotes/1.5.0.1.txt[1.5.0.1],
404   link:RelNotes/1.5.0.txt[1.5.0].
406 * documentation for release link:v1.4.4.4/git.html[1.4.4.4],
407   link:v1.3.3/git.html[1.3.3],
408   link:v1.2.6/git.html[1.2.6],
409   link:v1.0.13/git.html[1.0.13].
411 ============
413 endif::stalenotes[]
415 OPTIONS
416 -------
417 --version::
418         Prints the Git suite version that the 'git' program came from.
420 --help::
421         Prints the synopsis and a list of the most commonly used
422         commands. If the option '--all' or '-a' is given then all
423         available commands are printed. If a Git command is named this
424         option will bring up the manual page for that command.
426 Other options are available to control how the manual page is
427 displayed. See linkgit:git-help[1] for more information,
428 because `git --help ...` is converted internally into `git
429 help ...`.
431 -C <path>::
432         Run as if git was started in '<path>' instead of the current working
433         directory.  When multiple `-C` options are given, each subsequent
434         non-absolute `-C <path>` is interpreted relative to the preceding `-C
435         <path>`.
437 This option affects options that expect path name like `--git-dir` and
438 `--work-tree` in that their interpretations of the path names would be
439 made relative to the working directory caused by the `-C` option. For
440 example the following invocations are equivalent:
442     git --git-dir=a.git --work-tree=b -C c status
443     git --git-dir=c/a.git --work-tree=c/b status
445 -c <name>=<value>::
446         Pass a configuration parameter to the command. The value
447         given will override values from configuration files.
448         The <name> is expected in the same format as listed by
449         'git config' (subkeys separated by dots).
451 --exec-path[=<path>]::
452         Path to wherever your core Git programs are installed.
453         This can also be controlled by setting the GIT_EXEC_PATH
454         environment variable. If no path is given, 'git' will print
455         the current setting and then exit.
457 --html-path::
458         Print the path, without trailing slash, where Git's HTML
459         documentation is installed and exit.
461 --man-path::
462         Print the manpath (see `man(1)`) for the man pages for
463         this version of Git and exit.
465 --info-path::
466         Print the path where the Info files documenting this
467         version of Git are installed and exit.
469 -p::
470 --paginate::
471         Pipe all output into 'less' (or if set, $PAGER) if standard
472         output is a terminal.  This overrides the `pager.<cmd>`
473         configuration options (see the "Configuration Mechanism" section
474         below).
476 --no-pager::
477         Do not pipe Git output into a pager.
479 --git-dir=<path>::
480         Set the path to the repository. This can also be controlled by
481         setting the GIT_DIR environment variable. It can be an absolute
482         path or relative path to current working directory.
484 --work-tree=<path>::
485         Set the path to the working tree. It can be an absolute path
486         or a path relative to the current working directory.
487         This can also be controlled by setting the GIT_WORK_TREE
488         environment variable and the core.worktree configuration
489         variable (see core.worktree in linkgit:git-config[1] for a
490         more detailed discussion).
492 --namespace=<path>::
493         Set the Git namespace.  See linkgit:gitnamespaces[7] for more
494         details.  Equivalent to setting the `GIT_NAMESPACE` environment
495         variable.
497 --bare::
498         Treat the repository as a bare repository.  If GIT_DIR
499         environment is not set, it is set to the current working
500         directory.
502 --no-replace-objects::
503         Do not use replacement refs to replace Git objects. See
504         linkgit:git-replace[1] for more information.
506 --literal-pathspecs::
507         Treat pathspecs literally (i.e. no globbing, no pathspec magic).
508         This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
509         variable to `1`.
511 --glob-pathspecs::
512         Add "glob" magic to all pathspec. This is equivalent to setting
513         the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
514         globbing on individual pathspecs can be done using pathspec
515         magic ":(literal)"
517 --noglob-pathspecs::
518         Add "literal" magic to all pathspec. This is equivalent to setting
519         the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
520         globbing on individual pathspecs can be done using pathspec
521         magic ":(glob)"
523 --icase-pathspecs::
524         Add "icase" magic to all pathspec. This is equivalent to setting
525         the `GIT_ICASE_PATHSPECS` environment variable to `1`.
527 GIT COMMANDS
528 ------------
530 We divide Git into high level ("porcelain") commands and low level
531 ("plumbing") commands.
533 High-level commands (porcelain)
534 -------------------------------
536 We separate the porcelain commands into the main commands and some
537 ancillary user utilities.
539 Main porcelain commands
540 ~~~~~~~~~~~~~~~~~~~~~~~
542 include::cmds-mainporcelain.txt[]
544 Ancillary Commands
545 ~~~~~~~~~~~~~~~~~~
546 Manipulators:
548 include::cmds-ancillarymanipulators.txt[]
550 Interrogators:
552 include::cmds-ancillaryinterrogators.txt[]
555 Interacting with Others
556 ~~~~~~~~~~~~~~~~~~~~~~~
558 These commands are to interact with foreign SCM and with other
559 people via patch over e-mail.
561 include::cmds-foreignscminterface.txt[]
564 Low-level commands (plumbing)
565 -----------------------------
567 Although Git includes its
568 own porcelain layer, its low-level commands are sufficient to support
569 development of alternative porcelains.  Developers of such porcelains
570 might start by reading about linkgit:git-update-index[1] and
571 linkgit:git-read-tree[1].
573 The interface (input, output, set of options and the semantics)
574 to these low-level commands are meant to be a lot more stable
575 than Porcelain level commands, because these commands are
576 primarily for scripted use.  The interface to Porcelain commands
577 on the other hand are subject to change in order to improve the
578 end user experience.
580 The following description divides
581 the low-level commands into commands that manipulate objects (in
582 the repository, index, and working tree), commands that interrogate and
583 compare objects, and commands that move objects and references between
584 repositories.
587 Manipulation commands
588 ~~~~~~~~~~~~~~~~~~~~~
590 include::cmds-plumbingmanipulators.txt[]
593 Interrogation commands
594 ~~~~~~~~~~~~~~~~~~~~~~
596 include::cmds-plumbinginterrogators.txt[]
598 In general, the interrogate commands do not touch the files in
599 the working tree.
602 Synching repositories
603 ~~~~~~~~~~~~~~~~~~~~~
605 include::cmds-synchingrepositories.txt[]
607 The following are helper commands used by the above; end users
608 typically do not use them directly.
610 include::cmds-synchelpers.txt[]
613 Internal helper commands
614 ~~~~~~~~~~~~~~~~~~~~~~~~
616 These are internal helper commands used by other commands; end
617 users typically do not use them directly.
619 include::cmds-purehelpers.txt[]
622 Configuration Mechanism
623 -----------------------
625 Git uses a simple text format to store customizations that are per
626 repository and are per user.  Such a configuration file may look
627 like this:
629 ------------
631 # A '#' or ';' character indicates a comment.
634 ; core variables
635 [core]
636         ; Don't trust file modes
637         filemode = false
639 ; user identity
640 [user]
641         name = "Junio C Hamano"
642         email = "gitster@pobox.com"
644 ------------
646 Various commands read from the configuration file and adjust
647 their operation accordingly.  See linkgit:git-config[1] for a
648 list and more details about the configuration mechanism.
651 Identifier Terminology
652 ----------------------
653 <object>::
654         Indicates the object name for any type of object.
656 <blob>::
657         Indicates a blob object name.
659 <tree>::
660         Indicates a tree object name.
662 <commit>::
663         Indicates a commit object name.
665 <tree-ish>::
666         Indicates a tree, commit or tag object name.  A
667         command that takes a <tree-ish> argument ultimately wants to
668         operate on a <tree> object but automatically dereferences
669         <commit> and <tag> objects that point at a <tree>.
671 <commit-ish>::
672         Indicates a commit or tag object name.  A
673         command that takes a <commit-ish> argument ultimately wants to
674         operate on a <commit> object but automatically dereferences
675         <tag> objects that point at a <commit>.
677 <type>::
678         Indicates that an object type is required.
679         Currently one of: `blob`, `tree`, `commit`, or `tag`.
681 <file>::
682         Indicates a filename - almost always relative to the
683         root of the tree structure `GIT_INDEX_FILE` describes.
685 Symbolic Identifiers
686 --------------------
687 Any Git command accepting any <object> can also use the following
688 symbolic notation:
690 HEAD::
691         indicates the head of the current branch.
693 <tag>::
694         a valid tag 'name'
695         (i.e. a `refs/tags/<tag>` reference).
697 <head>::
698         a valid head 'name'
699         (i.e. a `refs/heads/<head>` reference).
701 For a more complete list of ways to spell object names, see
702 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
705 File/Directory Structure
706 ------------------------
708 Please see the linkgit:gitrepository-layout[5] document.
710 Read linkgit:githooks[5] for more details about each hook.
712 Higher level SCMs may provide and manage additional information in the
713 `$GIT_DIR`.
716 Terminology
717 -----------
718 Please see linkgit:gitglossary[7].
721 Environment Variables
722 ---------------------
723 Various Git commands use the following environment variables:
725 The Git Repository
726 ~~~~~~~~~~~~~~~~~~
727 These environment variables apply to 'all' core Git commands. Nb: it
728 is worth noting that they may be used/overridden by SCMS sitting above
729 Git so take care if using Cogito etc.
731 'GIT_INDEX_FILE'::
732         This environment allows the specification of an alternate
733         index file. If not specified, the default of `$GIT_DIR/index`
734         is used.
736 'GIT_INDEX_VERSION'::
737         This environment variable allows the specification of an index
738         version for new repositories.  It won't affect existing index
739         files.  By default index file version [23] is used.
741 'GIT_OBJECT_DIRECTORY'::
742         If the object storage directory is specified via this
743         environment variable then the sha1 directories are created
744         underneath - otherwise the default `$GIT_DIR/objects`
745         directory is used.
747 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
748         Due to the immutable nature of Git objects, old objects can be
749         archived into shared, read-only directories. This variable
750         specifies a ":" separated (on Windows ";" separated) list
751         of Git object directories which can be used to search for Git
752         objects. New objects will not be written to these directories.
754 'GIT_DIR'::
755         If the 'GIT_DIR' environment variable is set then it
756         specifies a path to use instead of the default `.git`
757         for the base of the repository.
758         The '--git-dir' command-line option also sets this value.
760 'GIT_WORK_TREE'::
761         Set the path to the root of the working tree.
762         This can also be controlled by the '--work-tree' command-line
763         option and the core.worktree configuration variable.
765 'GIT_NAMESPACE'::
766         Set the Git namespace; see linkgit:gitnamespaces[7] for details.
767         The '--namespace' command-line option also sets this value.
769 'GIT_CEILING_DIRECTORIES'::
770         This should be a colon-separated list of absolute paths.  If
771         set, it is a list of directories that Git should not chdir up
772         into while looking for a repository directory (useful for
773         excluding slow-loading network directories).  It will not
774         exclude the current working directory or a GIT_DIR set on the
775         command line or in the environment.  Normally, Git has to read
776         the entries in this list and resolve any symlink that
777         might be present in order to compare them with the current
778         directory.  However, if even this access is slow, you
779         can add an empty entry to the list to tell Git that the
780         subsequent entries are not symlinks and needn't be resolved;
781         e.g.,
782         'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
784 'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
785         When run in a directory that does not have ".git" repository
786         directory, Git tries to find such a directory in the parent
787         directories to find the top of the working tree, but by default it
788         does not cross filesystem boundaries.  This environment variable
789         can be set to true to tell Git not to stop at filesystem
790         boundaries.  Like 'GIT_CEILING_DIRECTORIES', this will not affect
791         an explicit repository directory set via 'GIT_DIR' or on the
792         command line.
794 Git Commits
795 ~~~~~~~~~~~
796 'GIT_AUTHOR_NAME'::
797 'GIT_AUTHOR_EMAIL'::
798 'GIT_AUTHOR_DATE'::
799 'GIT_COMMITTER_NAME'::
800 'GIT_COMMITTER_EMAIL'::
801 'GIT_COMMITTER_DATE'::
802 'EMAIL'::
803         see linkgit:git-commit-tree[1]
805 Git Diffs
806 ~~~~~~~~~
807 'GIT_DIFF_OPTS'::
808         Only valid setting is "--unified=??" or "-u??" to set the
809         number of context lines shown when a unified diff is created.
810         This takes precedence over any "-U" or "--unified" option
811         value passed on the Git diff command line.
813 'GIT_EXTERNAL_DIFF'::
814         When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
815         program named by it is called, instead of the diff invocation
816         described above.  For a path that is added, removed, or modified,
817         'GIT_EXTERNAL_DIFF' is called with 7 parameters:
819         path old-file old-hex old-mode new-file new-hex new-mode
821 where:
823         <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
824                          contents of <old|new>,
825         <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
826         <old|new>-mode:: are the octal representation of the file modes.
828 The file parameters can point at the user's working file
829 (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
830 when a new file is added), or a temporary file (e.g. `old-file` in the
831 index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the
832 temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
834 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
835 parameter, <path>.
837 For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
838 'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
840 'GIT_DIFF_PATH_COUNTER'::
841         A 1-based counter incremented by one for every path.
843 'GIT_DIFF_PATH_TOTAL'::
844         The total number of paths.
846 other
847 ~~~~~
848 'GIT_MERGE_VERBOSITY'::
849         A number controlling the amount of output shown by
850         the recursive merge strategy.  Overrides merge.verbosity.
851         See linkgit:git-merge[1]
853 'GIT_PAGER'::
854         This environment variable overrides `$PAGER`. If it is set
855         to an empty string or to the value "cat", Git will not launch
856         a pager.  See also the `core.pager` option in
857         linkgit:git-config[1].
859 'GIT_EDITOR'::
860         This environment variable overrides `$EDITOR` and `$VISUAL`.
861         It is used by several Git commands when, on interactive mode,
862         an editor is to be launched. See also linkgit:git-var[1]
863         and the `core.editor` option in linkgit:git-config[1].
865 'GIT_SSH'::
866         If this environment variable is set then 'git fetch'
867         and 'git push' will use this command instead
868         of 'ssh' when they need to connect to a remote system.
869         The '$GIT_SSH' command will be given exactly two or
870         four arguments: the 'username@host' (or just 'host')
871         from the URL and the shell command to execute on that
872         remote system, optionally preceded by '-p' (literally) and
873         the 'port' from the URL when it specifies something other
874         than the default SSH port.
876 To pass options to the program that you want to list in GIT_SSH
877 you will need to wrap the program and options into a shell script,
878 then set GIT_SSH to refer to the shell script.
880 Usually it is easier to configure any desired options through your
881 personal `.ssh/config` file.  Please consult your ssh documentation
882 for further details.
884 'GIT_ASKPASS'::
885         If this environment variable is set, then Git commands which need to
886         acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
887         will call this program with a suitable prompt as command-line argument
888         and read the password from its STDOUT. See also the 'core.askpass'
889         option in linkgit:git-config[1].
891 'GIT_CONFIG_NOSYSTEM'::
892         Whether to skip reading settings from the system-wide
893         `$(prefix)/etc/gitconfig` file.  This environment variable can
894         be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
895         predictable environment for a picky script, or you can set it
896         temporarily to avoid using a buggy `/etc/gitconfig` file while
897         waiting for someone with sufficient permissions to fix it.
899 'GIT_FLUSH'::
900         If this environment variable is set to "1", then commands such
901         as 'git blame' (in incremental mode), 'git rev-list', 'git log',
902         'git check-attr' and 'git check-ignore' will
903         force a flush of the output stream after each record have been
904         flushed. If this
905         variable is set to "0", the output of these commands will be done
906         using completely buffered I/O.   If this environment variable is
907         not set, Git will choose buffered or record-oriented flushing
908         based on whether stdout appears to be redirected to a file or not.
910 'GIT_TRACE'::
911         Enables general trace messages, e.g. alias expansion, built-in
912         command execution and external command execution.
914 If this variable is set to "1", "2" or "true" (comparison
915 is case insensitive), trace messages will be printed to
916 stderr.
918 If the variable is set to an integer value greater than 2
919 and lower than 10 (strictly) then Git will interpret this
920 value as an open file descriptor and will try to write the
921 trace messages into this file descriptor.
923 Alternatively, if the variable is set to an absolute path
924 (starting with a '/' character), Git will interpret this
925 as a file path and will try to write the trace messages
926 into it.
928 Unsetting the variable, or setting it to empty, "0" or
929 "false" (case insensitive) disables trace messages.
931 'GIT_TRACE_PACK_ACCESS'::
932         Enables trace messages for all accesses to any packs. For each
933         access, the pack file name and an offset in the pack is
934         recorded. This may be helpful for troubleshooting some
935         pack-related performance problems.
936         See 'GIT_TRACE' for available trace output options.
938 'GIT_TRACE_PACKET'::
939         Enables trace messages for all packets coming in or out of a
940         given program. This can help with debugging object negotiation
941         or other protocol issues. Tracing is turned off at a packet
942         starting with "PACK".
943         See 'GIT_TRACE' for available trace output options.
945 'GIT_TRACE_PERFORMANCE'::
946         Enables performance related trace messages, e.g. total execution
947         time of each Git command.
948         See 'GIT_TRACE' for available trace output options.
950 'GIT_TRACE_SETUP'::
951         Enables trace messages printing the .git, working tree and current
952         working directory after Git has completed its setup phase.
953         See 'GIT_TRACE' for available trace output options.
955 'GIT_TRACE_SHALLOW'::
956         Enables trace messages that can help debugging fetching /
957         cloning of shallow repositories.
958         See 'GIT_TRACE' for available trace output options.
960 GIT_LITERAL_PATHSPECS::
961         Setting this variable to `1` will cause Git to treat all
962         pathspecs literally, rather than as glob patterns. For example,
963         running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
964         for commits that touch the path `*.c`, not any paths that the
965         glob `*.c` matches. You might want this if you are feeding
966         literal paths to Git (e.g., paths previously given to you by
967         `git ls-tree`, `--raw` diff output, etc).
969 GIT_GLOB_PATHSPECS::
970         Setting this variable to `1` will cause Git to treat all
971         pathspecs as glob patterns (aka "glob" magic).
973 GIT_NOGLOB_PATHSPECS::
974         Setting this variable to `1` will cause Git to treat all
975         pathspecs as literal (aka "literal" magic).
977 GIT_ICASE_PATHSPECS::
978         Setting this variable to `1` will cause Git to treat all
979         pathspecs as case-insensitive.
981 'GIT_REFLOG_ACTION'::
982         When a ref is updated, reflog entries are created to keep
983         track of the reason why the ref was updated (which is
984         typically the name of the high-level command that updated
985         the ref), in addition to the old and new values of the ref.
986         A scripted Porcelain command can use set_reflog_action
987         helper function in `git-sh-setup` to set its name to this
988         variable when it is invoked as the top level command by the
989         end user, to be recorded in the body of the reflog.
992 Discussion[[Discussion]]
993 ------------------------
995 More detail on the following is available from the
996 link:user-manual.html#git-concepts[Git concepts chapter of the
997 user-manual] and linkgit:gitcore-tutorial[7].
999 A Git project normally consists of a working directory with a ".git"
1000 subdirectory at the top level.  The .git directory contains, among other
1001 things, a compressed object database representing the complete history
1002 of the project, an "index" file which links that history to the current
1003 contents of the working tree, and named pointers into that history such
1004 as tags and branch heads.
1006 The object database contains objects of three main types: blobs, which
1007 hold file data; trees, which point to blobs and other trees to build up
1008 directory hierarchies; and commits, which each reference a single tree
1009 and some number of parent commits.
1011 The commit, equivalent to what other systems call a "changeset" or
1012 "version", represents a step in the project's history, and each parent
1013 represents an immediately preceding step.  Commits with more than one
1014 parent represent merges of independent lines of development.
1016 All objects are named by the SHA-1 hash of their contents, normally
1017 written as a string of 40 hex digits.  Such names are globally unique.
1018 The entire history leading up to a commit can be vouched for by signing
1019 just that commit.  A fourth object type, the tag, is provided for this
1020 purpose.
1022 When first created, objects are stored in individual files, but for
1023 efficiency may later be compressed together into "pack files".
1025 Named pointers called refs mark interesting points in history.  A ref
1026 may contain the SHA-1 name of an object or the name of another ref.  Refs
1027 with names beginning `ref/head/` contain the SHA-1 name of the most
1028 recent commit (or "head") of a branch under development.  SHA-1 names of
1029 tags of interest are stored under `ref/tags/`.  A special ref named
1030 `HEAD` contains the name of the currently checked-out branch.
1032 The index file is initialized with a list of all paths and, for each
1033 path, a blob object and a set of attributes.  The blob object represents
1034 the contents of the file as of the head of the current branch.  The
1035 attributes (last modified time, size, etc.) are taken from the
1036 corresponding file in the working tree.  Subsequent changes to the
1037 working tree can be found by comparing these attributes.  The index may
1038 be updated with new content, and new commits may be created from the
1039 content stored in the index.
1041 The index is also capable of storing multiple entries (called "stages")
1042 for a given pathname.  These stages are used to hold the various
1043 unmerged version of a file when a merge is in progress.
1045 FURTHER DOCUMENTATION
1046 ---------------------
1048 See the references in the "description" section to get started
1049 using Git.  The following is probably more detail than necessary
1050 for a first-time user.
1052 The link:user-manual.html#git-concepts[Git concepts chapter of the
1053 user-manual] and linkgit:gitcore-tutorial[7] both provide
1054 introductions to the underlying Git architecture.
1056 See linkgit:gitworkflows[7] for an overview of recommended workflows.
1058 See also the link:howto-index.html[howto] documents for some useful
1059 examples.
1061 The internals are documented in the
1062 link:technical/api-index.html[Git API documentation].
1064 Users migrating from CVS may also want to
1065 read linkgit:gitcvs-migration[7].
1068 Authors
1069 -------
1070 Git was started by Linus Torvalds, and is currently maintained by Junio
1071 C Hamano. Numerous contributions have come from the Git mailing list
1072 <git@vger.kernel.org>.  http://www.openhub.net/p/git/contributors/summary
1073 gives you a more complete list of contributors.
1075 If you have a clone of git.git itself, the
1076 output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1077 the authors for specific parts of the project.
1079 Reporting Bugs
1080 --------------
1082 Report bugs to the Git mailing list <git@vger.kernel.org> where the
1083 development and maintenance is primarily done.  You do not have to be
1084 subscribed to the list to send a message there.
1086 SEE ALSO
1087 --------
1088 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
1089 link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
1090 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
1091 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1092 linkgit:gitworkflows[7]
1096 Part of the linkgit:git[1] suite