Git 1.8.2.3
[alt-git.git] / Documentation / git.txt
blob9e302b0a60552c4297cb94018dad49169505bd35
1 git(1)
2 ======
4 NAME
5 ----
6 git - the stupid content tracker
9 SYNOPSIS
10 --------
11 [verse]
12 'git' [--version] [--help] [-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 'master'
43 branch of the `git.git` repository.
44 Documentation for older releases are available here:
46 * link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
48 * release notes for
49   link:RelNotes/1.8.2.3.txt[1.8.2.3].
50   link:RelNotes/1.8.2.2.txt[1.8.2.2].
51   link:RelNotes/1.8.2.1.txt[1.8.2.1].
52   link:RelNotes/1.8.2.txt[1.8.2].
54 * link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
56 * release notes for
57   link:RelNotes/1.8.1.6.txt[1.8.1.6],
58   link:RelNotes/1.8.1.5.txt[1.8.1.5],
59   link:RelNotes/1.8.1.4.txt[1.8.1.4],
60   link:RelNotes/1.8.1.3.txt[1.8.1.3],
61   link:RelNotes/1.8.1.2.txt[1.8.1.2],
62   link:RelNotes/1.8.1.1.txt[1.8.1.1],
63   link:RelNotes/1.8.1.txt[1.8.1].
65 * link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
67 * release notes for
68   link:RelNotes/1.8.0.3.txt[1.8.0.3],
69   link:RelNotes/1.8.0.2.txt[1.8.0.2],
70   link:RelNotes/1.8.0.1.txt[1.8.0.1],
71   link:RelNotes/1.8.0.txt[1.8.0].
73 * link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
75 * release notes for
76   link:RelNotes/1.7.12.4.txt[1.7.12.4],
77   link:RelNotes/1.7.12.3.txt[1.7.12.3],
78   link:RelNotes/1.7.12.2.txt[1.7.12.2],
79   link:RelNotes/1.7.12.1.txt[1.7.12.1],
80   link:RelNotes/1.7.12.txt[1.7.12].
82 * link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
84 * release notes for
85   link:RelNotes/1.7.11.7.txt[1.7.11.7],
86   link:RelNotes/1.7.11.6.txt[1.7.11.6],
87   link:RelNotes/1.7.11.5.txt[1.7.11.5],
88   link:RelNotes/1.7.11.4.txt[1.7.11.4],
89   link:RelNotes/1.7.11.3.txt[1.7.11.3],
90   link:RelNotes/1.7.11.2.txt[1.7.11.2],
91   link:RelNotes/1.7.11.1.txt[1.7.11.1],
92   link:RelNotes/1.7.11.txt[1.7.11].
94 * link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
96 * release notes for
97   link:RelNotes/1.7.10.5.txt[1.7.10.5],
98   link:RelNotes/1.7.10.4.txt[1.7.10.4],
99   link:RelNotes/1.7.10.3.txt[1.7.10.3],
100   link:RelNotes/1.7.10.2.txt[1.7.10.2],
101   link:RelNotes/1.7.10.1.txt[1.7.10.1],
102   link:RelNotes/1.7.10.txt[1.7.10].
104 * link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
106 * release notes for
107   link:RelNotes/1.7.9.7.txt[1.7.9.7],
108   link:RelNotes/1.7.9.6.txt[1.7.9.6],
109   link:RelNotes/1.7.9.5.txt[1.7.9.5],
110   link:RelNotes/1.7.9.4.txt[1.7.9.4],
111   link:RelNotes/1.7.9.3.txt[1.7.9.3],
112   link:RelNotes/1.7.9.2.txt[1.7.9.2],
113   link:RelNotes/1.7.9.1.txt[1.7.9.1],
114   link:RelNotes/1.7.9.txt[1.7.9].
116 * link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
118 * release notes for
119   link:RelNotes/1.7.8.6.txt[1.7.8.6],
120   link:RelNotes/1.7.8.5.txt[1.7.8.5],
121   link:RelNotes/1.7.8.4.txt[1.7.8.4],
122   link:RelNotes/1.7.8.3.txt[1.7.8.3],
123   link:RelNotes/1.7.8.2.txt[1.7.8.2],
124   link:RelNotes/1.7.8.1.txt[1.7.8.1],
125   link:RelNotes/1.7.8.txt[1.7.8].
127 * link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
129 * release notes for
130   link:RelNotes/1.7.7.7.txt[1.7.7.7],
131   link:RelNotes/1.7.7.6.txt[1.7.7.6],
132   link:RelNotes/1.7.7.5.txt[1.7.7.5],
133   link:RelNotes/1.7.7.4.txt[1.7.7.4],
134   link:RelNotes/1.7.7.3.txt[1.7.7.3],
135   link:RelNotes/1.7.7.2.txt[1.7.7.2],
136   link:RelNotes/1.7.7.1.txt[1.7.7.1],
137   link:RelNotes/1.7.7.txt[1.7.7].
139 * link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
141 * release notes for
142   link:RelNotes/1.7.6.6.txt[1.7.6.6],
143   link:RelNotes/1.7.6.5.txt[1.7.6.5],
144   link:RelNotes/1.7.6.4.txt[1.7.6.4],
145   link:RelNotes/1.7.6.3.txt[1.7.6.3],
146   link:RelNotes/1.7.6.2.txt[1.7.6.2],
147   link:RelNotes/1.7.6.1.txt[1.7.6.1],
148   link:RelNotes/1.7.6.txt[1.7.6].
150 * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
152 * release notes for
153   link:RelNotes/1.7.5.4.txt[1.7.5.4],
154   link:RelNotes/1.7.5.3.txt[1.7.5.3],
155   link:RelNotes/1.7.5.2.txt[1.7.5.2],
156   link:RelNotes/1.7.5.1.txt[1.7.5.1],
157   link:RelNotes/1.7.5.txt[1.7.5].
159 * link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
161 * release notes for
162   link:RelNotes/1.7.4.5.txt[1.7.4.5],
163   link:RelNotes/1.7.4.4.txt[1.7.4.4],
164   link:RelNotes/1.7.4.3.txt[1.7.4.3],
165   link:RelNotes/1.7.4.2.txt[1.7.4.2],
166   link:RelNotes/1.7.4.1.txt[1.7.4.1],
167   link:RelNotes/1.7.4.txt[1.7.4].
169 * link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
171 * release notes for
172   link:RelNotes/1.7.3.5.txt[1.7.3.5],
173   link:RelNotes/1.7.3.4.txt[1.7.3.4],
174   link:RelNotes/1.7.3.3.txt[1.7.3.3],
175   link:RelNotes/1.7.3.2.txt[1.7.3.2],
176   link:RelNotes/1.7.3.1.txt[1.7.3.1],
177   link:RelNotes/1.7.3.txt[1.7.3].
179 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
181 * release notes for
182   link:RelNotes/1.7.2.5.txt[1.7.2.5],
183   link:RelNotes/1.7.2.4.txt[1.7.2.4],
184   link:RelNotes/1.7.2.3.txt[1.7.2.3],
185   link:RelNotes/1.7.2.2.txt[1.7.2.2],
186   link:RelNotes/1.7.2.1.txt[1.7.2.1],
187   link:RelNotes/1.7.2.txt[1.7.2].
189 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
191 * release notes for
192   link:RelNotes/1.7.1.4.txt[1.7.1.4],
193   link:RelNotes/1.7.1.3.txt[1.7.1.3],
194   link:RelNotes/1.7.1.2.txt[1.7.1.2],
195   link:RelNotes/1.7.1.1.txt[1.7.1.1],
196   link:RelNotes/1.7.1.txt[1.7.1].
198 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
200 * release notes for
201   link:RelNotes/1.7.0.9.txt[1.7.0.9],
202   link:RelNotes/1.7.0.8.txt[1.7.0.8],
203   link:RelNotes/1.7.0.7.txt[1.7.0.7],
204   link:RelNotes/1.7.0.6.txt[1.7.0.6],
205   link:RelNotes/1.7.0.5.txt[1.7.0.5],
206   link:RelNotes/1.7.0.4.txt[1.7.0.4],
207   link:RelNotes/1.7.0.3.txt[1.7.0.3],
208   link:RelNotes/1.7.0.2.txt[1.7.0.2],
209   link:RelNotes/1.7.0.1.txt[1.7.0.1],
210   link:RelNotes/1.7.0.txt[1.7.0].
212 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
214 * release notes for
215   link:RelNotes/1.6.6.3.txt[1.6.6.3],
216   link:RelNotes/1.6.6.2.txt[1.6.6.2],
217   link:RelNotes/1.6.6.1.txt[1.6.6.1],
218   link:RelNotes/1.6.6.txt[1.6.6].
220 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
222 * release notes for
223   link:RelNotes/1.6.5.9.txt[1.6.5.9],
224   link:RelNotes/1.6.5.8.txt[1.6.5.8],
225   link:RelNotes/1.6.5.7.txt[1.6.5.7],
226   link:RelNotes/1.6.5.6.txt[1.6.5.6],
227   link:RelNotes/1.6.5.5.txt[1.6.5.5],
228   link:RelNotes/1.6.5.4.txt[1.6.5.4],
229   link:RelNotes/1.6.5.3.txt[1.6.5.3],
230   link:RelNotes/1.6.5.2.txt[1.6.5.2],
231   link:RelNotes/1.6.5.1.txt[1.6.5.1],
232   link:RelNotes/1.6.5.txt[1.6.5].
234 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
236 * release notes for
237   link:RelNotes/1.6.4.5.txt[1.6.4.5],
238   link:RelNotes/1.6.4.4.txt[1.6.4.4],
239   link:RelNotes/1.6.4.3.txt[1.6.4.3],
240   link:RelNotes/1.6.4.2.txt[1.6.4.2],
241   link:RelNotes/1.6.4.1.txt[1.6.4.1],
242   link:RelNotes/1.6.4.txt[1.6.4].
244 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
246 * release notes for
247   link:RelNotes/1.6.3.4.txt[1.6.3.4],
248   link:RelNotes/1.6.3.3.txt[1.6.3.3],
249   link:RelNotes/1.6.3.2.txt[1.6.3.2],
250   link:RelNotes/1.6.3.1.txt[1.6.3.1],
251   link:RelNotes/1.6.3.txt[1.6.3].
253 * release notes for
254   link:RelNotes/1.6.2.5.txt[1.6.2.5],
255   link:RelNotes/1.6.2.4.txt[1.6.2.4],
256   link:RelNotes/1.6.2.3.txt[1.6.2.3],
257   link:RelNotes/1.6.2.2.txt[1.6.2.2],
258   link:RelNotes/1.6.2.1.txt[1.6.2.1],
259   link:RelNotes/1.6.2.txt[1.6.2].
261 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
263 * release notes for
264   link:RelNotes/1.6.1.3.txt[1.6.1.3],
265   link:RelNotes/1.6.1.2.txt[1.6.1.2],
266   link:RelNotes/1.6.1.1.txt[1.6.1.1],
267   link:RelNotes/1.6.1.txt[1.6.1].
269 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
271 * release notes for
272   link:RelNotes/1.6.0.6.txt[1.6.0.6],
273   link:RelNotes/1.6.0.5.txt[1.6.0.5],
274   link:RelNotes/1.6.0.4.txt[1.6.0.4],
275   link:RelNotes/1.6.0.3.txt[1.6.0.3],
276   link:RelNotes/1.6.0.2.txt[1.6.0.2],
277   link:RelNotes/1.6.0.1.txt[1.6.0.1],
278   link:RelNotes/1.6.0.txt[1.6.0].
280 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
282 * release notes for
283   link:RelNotes/1.5.6.6.txt[1.5.6.6],
284   link:RelNotes/1.5.6.5.txt[1.5.6.5],
285   link:RelNotes/1.5.6.4.txt[1.5.6.4],
286   link:RelNotes/1.5.6.3.txt[1.5.6.3],
287   link:RelNotes/1.5.6.2.txt[1.5.6.2],
288   link:RelNotes/1.5.6.1.txt[1.5.6.1],
289   link:RelNotes/1.5.6.txt[1.5.6].
291 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
293 * release notes for
294   link:RelNotes/1.5.5.6.txt[1.5.5.6],
295   link:RelNotes/1.5.5.5.txt[1.5.5.5],
296   link:RelNotes/1.5.5.4.txt[1.5.5.4],
297   link:RelNotes/1.5.5.3.txt[1.5.5.3],
298   link:RelNotes/1.5.5.2.txt[1.5.5.2],
299   link:RelNotes/1.5.5.1.txt[1.5.5.1],
300   link:RelNotes/1.5.5.txt[1.5.5].
302 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
304 * release notes for
305   link:RelNotes/1.5.4.7.txt[1.5.4.7],
306   link:RelNotes/1.5.4.6.txt[1.5.4.6],
307   link:RelNotes/1.5.4.5.txt[1.5.4.5],
308   link:RelNotes/1.5.4.4.txt[1.5.4.4],
309   link:RelNotes/1.5.4.3.txt[1.5.4.3],
310   link:RelNotes/1.5.4.2.txt[1.5.4.2],
311   link:RelNotes/1.5.4.1.txt[1.5.4.1],
312   link:RelNotes/1.5.4.txt[1.5.4].
314 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
316 * release notes for
317   link:RelNotes/1.5.3.8.txt[1.5.3.8],
318   link:RelNotes/1.5.3.7.txt[1.5.3.7],
319   link:RelNotes/1.5.3.6.txt[1.5.3.6],
320   link:RelNotes/1.5.3.5.txt[1.5.3.5],
321   link:RelNotes/1.5.3.4.txt[1.5.3.4],
322   link:RelNotes/1.5.3.3.txt[1.5.3.3],
323   link:RelNotes/1.5.3.2.txt[1.5.3.2],
324   link:RelNotes/1.5.3.1.txt[1.5.3.1],
325   link:RelNotes/1.5.3.txt[1.5.3].
327 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
329 * release notes for
330   link:RelNotes/1.5.2.5.txt[1.5.2.5],
331   link:RelNotes/1.5.2.4.txt[1.5.2.4],
332   link:RelNotes/1.5.2.3.txt[1.5.2.3],
333   link:RelNotes/1.5.2.2.txt[1.5.2.2],
334   link:RelNotes/1.5.2.1.txt[1.5.2.1],
335   link:RelNotes/1.5.2.txt[1.5.2].
337 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
339 * release notes for
340   link:RelNotes/1.5.1.6.txt[1.5.1.6],
341   link:RelNotes/1.5.1.5.txt[1.5.1.5],
342   link:RelNotes/1.5.1.4.txt[1.5.1.4],
343   link:RelNotes/1.5.1.3.txt[1.5.1.3],
344   link:RelNotes/1.5.1.2.txt[1.5.1.2],
345   link:RelNotes/1.5.1.1.txt[1.5.1.1],
346   link:RelNotes/1.5.1.txt[1.5.1].
348 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
350 * release notes for
351   link:RelNotes/1.5.0.7.txt[1.5.0.7],
352   link:RelNotes/1.5.0.6.txt[1.5.0.6],
353   link:RelNotes/1.5.0.5.txt[1.5.0.5],
354   link:RelNotes/1.5.0.3.txt[1.5.0.3],
355   link:RelNotes/1.5.0.2.txt[1.5.0.2],
356   link:RelNotes/1.5.0.1.txt[1.5.0.1],
357   link:RelNotes/1.5.0.txt[1.5.0].
359 * documentation for release link:v1.4.4.4/git.html[1.4.4.4],
360   link:v1.3.3/git.html[1.3.3],
361   link:v1.2.6/git.html[1.2.6],
362   link:v1.0.13/git.html[1.0.13].
364 ============
366 endif::stalenotes[]
368 OPTIONS
369 -------
370 --version::
371         Prints the Git suite version that the 'git' program came from.
373 --help::
374         Prints the synopsis and a list of the most commonly used
375         commands. If the option '--all' or '-a' is given then all
376         available commands are printed. If a Git command is named this
377         option will bring up the manual page for that command.
379 Other options are available to control how the manual page is
380 displayed. See linkgit:git-help[1] for more information,
381 because `git --help ...` is converted internally into `git
382 help ...`.
384 -c <name>=<value>::
385         Pass a configuration parameter to the command. The value
386         given will override values from configuration files.
387         The <name> is expected in the same format as listed by
388         'git config' (subkeys separated by dots).
390 --exec-path[=<path>]::
391         Path to wherever your core Git programs are installed.
392         This can also be controlled by setting the GIT_EXEC_PATH
393         environment variable. If no path is given, 'git' will print
394         the current setting and then exit.
396 --html-path::
397         Print the path, without trailing slash, where Git's HTML
398         documentation is installed and exit.
400 --man-path::
401         Print the manpath (see `man(1)`) for the man pages for
402         this version of Git and exit.
404 --info-path::
405         Print the path where the Info files documenting this
406         version of Git are installed and exit.
408 -p::
409 --paginate::
410         Pipe all output into 'less' (or if set, $PAGER) if standard
411         output is a terminal.  This overrides the `pager.<cmd>`
412         configuration options (see the "Configuration Mechanism" section
413         below).
415 --no-pager::
416         Do not pipe Git output into a pager.
418 --git-dir=<path>::
419         Set the path to the repository. This can also be controlled by
420         setting the GIT_DIR environment variable. It can be an absolute
421         path or relative path to current working directory.
423 --work-tree=<path>::
424         Set the path to the working tree. It can be an absolute path
425         or a path relative to the current working directory.
426         This can also be controlled by setting the GIT_WORK_TREE
427         environment variable and the core.worktree configuration
428         variable (see core.worktree in linkgit:git-config[1] for a
429         more detailed discussion).
431 --namespace=<path>::
432         Set the Git namespace.  See linkgit:gitnamespaces[7] for more
433         details.  Equivalent to setting the `GIT_NAMESPACE` environment
434         variable.
436 --bare::
437         Treat the repository as a bare repository.  If GIT_DIR
438         environment is not set, it is set to the current working
439         directory.
441 --no-replace-objects::
442         Do not use replacement refs to replace Git objects. See
443         linkgit:git-replace[1] for more information.
445 --literal-pathspecs::
446         Treat pathspecs literally, rather than as glob patterns. This is
447         equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
448         variable to `1`.
451 GIT COMMANDS
452 ------------
454 We divide Git into high level ("porcelain") commands and low level
455 ("plumbing") commands.
457 High-level commands (porcelain)
458 -------------------------------
460 We separate the porcelain commands into the main commands and some
461 ancillary user utilities.
463 Main porcelain commands
464 ~~~~~~~~~~~~~~~~~~~~~~~
466 include::cmds-mainporcelain.txt[]
468 Ancillary Commands
469 ~~~~~~~~~~~~~~~~~~
470 Manipulators:
472 include::cmds-ancillarymanipulators.txt[]
474 Interrogators:
476 include::cmds-ancillaryinterrogators.txt[]
479 Interacting with Others
480 ~~~~~~~~~~~~~~~~~~~~~~~
482 These commands are to interact with foreign SCM and with other
483 people via patch over e-mail.
485 include::cmds-foreignscminterface.txt[]
488 Low-level commands (plumbing)
489 -----------------------------
491 Although Git includes its
492 own porcelain layer, its low-level commands are sufficient to support
493 development of alternative porcelains.  Developers of such porcelains
494 might start by reading about linkgit:git-update-index[1] and
495 linkgit:git-read-tree[1].
497 The interface (input, output, set of options and the semantics)
498 to these low-level commands are meant to be a lot more stable
499 than Porcelain level commands, because these commands are
500 primarily for scripted use.  The interface to Porcelain commands
501 on the other hand are subject to change in order to improve the
502 end user experience.
504 The following description divides
505 the low-level commands into commands that manipulate objects (in
506 the repository, index, and working tree), commands that interrogate and
507 compare objects, and commands that move objects and references between
508 repositories.
511 Manipulation commands
512 ~~~~~~~~~~~~~~~~~~~~~
514 include::cmds-plumbingmanipulators.txt[]
517 Interrogation commands
518 ~~~~~~~~~~~~~~~~~~~~~~
520 include::cmds-plumbinginterrogators.txt[]
522 In general, the interrogate commands do not touch the files in
523 the working tree.
526 Synching repositories
527 ~~~~~~~~~~~~~~~~~~~~~
529 include::cmds-synchingrepositories.txt[]
531 The following are helper commands used by the above; end users
532 typically do not use them directly.
534 include::cmds-synchelpers.txt[]
537 Internal helper commands
538 ~~~~~~~~~~~~~~~~~~~~~~~~
540 These are internal helper commands used by other commands; end
541 users typically do not use them directly.
543 include::cmds-purehelpers.txt[]
546 Configuration Mechanism
547 -----------------------
549 Git uses a simple text format to store customizations that are per
550 repository and are per user.  Such a configuration file may look
551 like this:
553 ------------
555 # A '#' or ';' character indicates a comment.
558 ; core variables
559 [core]
560         ; Don't trust file modes
561         filemode = false
563 ; user identity
564 [user]
565         name = "Junio C Hamano"
566         email = "gitster@pobox.com"
568 ------------
570 Various commands read from the configuration file and adjust
571 their operation accordingly.  See linkgit:git-config[1] for a
572 list and more details about the configuration mechanism.
575 Identifier Terminology
576 ----------------------
577 <object>::
578         Indicates the object name for any type of object.
580 <blob>::
581         Indicates a blob object name.
583 <tree>::
584         Indicates a tree object name.
586 <commit>::
587         Indicates a commit object name.
589 <tree-ish>::
590         Indicates a tree, commit or tag object name.  A
591         command that takes a <tree-ish> argument ultimately wants to
592         operate on a <tree> object but automatically dereferences
593         <commit> and <tag> objects that point at a <tree>.
595 <commit-ish>::
596         Indicates a commit or tag object name.  A
597         command that takes a <commit-ish> argument ultimately wants to
598         operate on a <commit> object but automatically dereferences
599         <tag> objects that point at a <commit>.
601 <type>::
602         Indicates that an object type is required.
603         Currently one of: `blob`, `tree`, `commit`, or `tag`.
605 <file>::
606         Indicates a filename - almost always relative to the
607         root of the tree structure `GIT_INDEX_FILE` describes.
609 Symbolic Identifiers
610 --------------------
611 Any Git command accepting any <object> can also use the following
612 symbolic notation:
614 HEAD::
615         indicates the head of the current branch.
617 <tag>::
618         a valid tag 'name'
619         (i.e. a `refs/tags/<tag>` reference).
621 <head>::
622         a valid head 'name'
623         (i.e. a `refs/heads/<head>` reference).
625 For a more complete list of ways to spell object names, see
626 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
629 File/Directory Structure
630 ------------------------
632 Please see the linkgit:gitrepository-layout[5] document.
634 Read linkgit:githooks[5] for more details about each hook.
636 Higher level SCMs may provide and manage additional information in the
637 `$GIT_DIR`.
640 Terminology
641 -----------
642 Please see linkgit:gitglossary[7].
645 Environment Variables
646 ---------------------
647 Various Git commands use the following environment variables:
649 The Git Repository
650 ~~~~~~~~~~~~~~~~~~
651 These environment variables apply to 'all' core Git commands. Nb: it
652 is worth noting that they may be used/overridden by SCMS sitting above
653 Git so take care if using Cogito etc.
655 'GIT_INDEX_FILE'::
656         This environment allows the specification of an alternate
657         index file. If not specified, the default of `$GIT_DIR/index`
658         is used.
660 'GIT_OBJECT_DIRECTORY'::
661         If the object storage directory is specified via this
662         environment variable then the sha1 directories are created
663         underneath - otherwise the default `$GIT_DIR/objects`
664         directory is used.
666 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
667         Due to the immutable nature of Git objects, old objects can be
668         archived into shared, read-only directories. This variable
669         specifies a ":" separated (on Windows ";" separated) list
670         of Git object directories which can be used to search for Git
671         objects. New objects will not be written to these directories.
673 'GIT_DIR'::
674         If the 'GIT_DIR' environment variable is set then it
675         specifies a path to use instead of the default `.git`
676         for the base of the repository.
677         The '--git-dir' command-line option also sets this value.
679 'GIT_WORK_TREE'::
680         Set the path to the working tree.  The value will not be
681         used in combination with repositories found automatically in
682         a .git directory (i.e. $GIT_DIR is not set).
683         This can also be controlled by the '--work-tree' command line
684         option and the core.worktree configuration variable.
686 'GIT_NAMESPACE'::
687         Set the Git namespace; see linkgit:gitnamespaces[7] for details.
688         The '--namespace' command-line option also sets this value.
690 'GIT_CEILING_DIRECTORIES'::
691         This should be a colon-separated list of absolute paths.  If
692         set, it is a list of directories that Git should not chdir up
693         into while looking for a repository directory (useful for
694         excluding slow-loading network directories).  It will not
695         exclude the current working directory or a GIT_DIR set on the
696         command line or in the environment.  Normally, Git has to read
697         the entries in this list and resolve any symlink that
698         might be present in order to compare them with the current
699         directory.  However, if even this access is slow, you
700         can add an empty entry to the list to tell Git that the
701         subsequent entries are not symlinks and needn't be resolved;
702         e.g.,
703         'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
705 'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
706         When run in a directory that does not have ".git" repository
707         directory, Git tries to find such a directory in the parent
708         directories to find the top of the working tree, but by default it
709         does not cross filesystem boundaries.  This environment variable
710         can be set to true to tell Git not to stop at filesystem
711         boundaries.  Like 'GIT_CEILING_DIRECTORIES', this will not affect
712         an explicit repository directory set via 'GIT_DIR' or on the
713         command line.
715 Git Commits
716 ~~~~~~~~~~~
717 'GIT_AUTHOR_NAME'::
718 'GIT_AUTHOR_EMAIL'::
719 'GIT_AUTHOR_DATE'::
720 'GIT_COMMITTER_NAME'::
721 'GIT_COMMITTER_EMAIL'::
722 'GIT_COMMITTER_DATE'::
723 'EMAIL'::
724         see linkgit:git-commit-tree[1]
726 Git Diffs
727 ~~~~~~~~~
728 'GIT_DIFF_OPTS'::
729         Only valid setting is "--unified=??" or "-u??" to set the
730         number of context lines shown when a unified diff is created.
731         This takes precedence over any "-U" or "--unified" option
732         value passed on the Git diff command line.
734 'GIT_EXTERNAL_DIFF'::
735         When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
736         program named by it is called, instead of the diff invocation
737         described above.  For a path that is added, removed, or modified,
738         'GIT_EXTERNAL_DIFF' is called with 7 parameters:
740         path old-file old-hex old-mode new-file new-hex new-mode
742 where:
744         <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
745                          contents of <old|new>,
746         <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
747         <old|new>-mode:: are the octal representation of the file modes.
749 The file parameters can point at the user's working file
750 (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
751 when a new file is added), or a temporary file (e.g. `old-file` in the
752 index).  'GIT_EXTERNAL_DIFF' should not worry about unlinking the
753 temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
755 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
756 parameter, <path>.
758 other
759 ~~~~~
760 'GIT_MERGE_VERBOSITY'::
761         A number controlling the amount of output shown by
762         the recursive merge strategy.  Overrides merge.verbosity.
763         See linkgit:git-merge[1]
765 'GIT_PAGER'::
766         This environment variable overrides `$PAGER`. If it is set
767         to an empty string or to the value "cat", Git will not launch
768         a pager.  See also the `core.pager` option in
769         linkgit:git-config[1].
771 'GIT_EDITOR'::
772         This environment variable overrides `$EDITOR` and `$VISUAL`.
773         It is used by several Git commands when, on interactive mode,
774         an editor is to be launched. See also linkgit:git-var[1]
775         and the `core.editor` option in linkgit:git-config[1].
777 'GIT_SSH'::
778         If this environment variable is set then 'git fetch'
779         and 'git push' will use this command instead
780         of 'ssh' when they need to connect to a remote system.
781         The '$GIT_SSH' command will be given exactly two or
782         four arguments: the 'username@host' (or just 'host')
783         from the URL and the shell command to execute on that
784         remote system, optionally preceded by '-p' (literally) and
785         the 'port' from the URL when it specifies something other
786         than the default SSH port.
788 To pass options to the program that you want to list in GIT_SSH
789 you will need to wrap the program and options into a shell script,
790 then set GIT_SSH to refer to the shell script.
792 Usually it is easier to configure any desired options through your
793 personal `.ssh/config` file.  Please consult your ssh documentation
794 for further details.
796 'GIT_ASKPASS'::
797         If this environment variable is set, then Git commands which need to
798         acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
799         will call this program with a suitable prompt as command line argument
800         and read the password from its STDOUT. See also the 'core.askpass'
801         option in linkgit:git-config[1].
803 'GIT_CONFIG_NOSYSTEM'::
804         Whether to skip reading settings from the system-wide
805         `$(prefix)/etc/gitconfig` file.  This environment variable can
806         be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
807         predictable environment for a picky script, or you can set it
808         temporarily to avoid using a buggy `/etc/gitconfig` file while
809         waiting for someone with sufficient permissions to fix it.
811 'GIT_FLUSH'::
812         If this environment variable is set to "1", then commands such
813         as 'git blame' (in incremental mode), 'git rev-list', 'git log',
814         and 'git whatchanged' will force a flush of the output stream
815         after each commit-oriented record have been flushed.   If this
816         variable is set to "0", the output of these commands will be done
817         using completely buffered I/O.   If this environment variable is
818         not set, Git will choose buffered or record-oriented flushing
819         based on whether stdout appears to be redirected to a file or not.
821 'GIT_TRACE'::
822         If this variable is set to "1", "2" or "true" (comparison
823         is case insensitive), Git will print `trace:` messages on
824         stderr telling about alias expansion, built-in command
825         execution and external command execution.
826         If this variable is set to an integer value greater than 1
827         and lower than 10 (strictly) then Git will interpret this
828         value as an open file descriptor and will try to write the
829         trace messages into this file descriptor.
830         Alternatively, if this variable is set to an absolute path
831         (starting with a '/' character), Git will interpret this
832         as a file path and will try to write the trace messages
833         into it.
835 GIT_LITERAL_PATHSPECS::
836         Setting this variable to `1` will cause Git to treat all
837         pathspecs literally, rather than as glob patterns. For example,
838         running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
839         for commits that touch the path `*.c`, not any paths that the
840         glob `*.c` matches. You might want this if you are feeding
841         literal paths to Git (e.g., paths previously given to you by
842         `git ls-tree`, `--raw` diff output, etc).
845 Discussion[[Discussion]]
846 ------------------------
848 More detail on the following is available from the
849 link:user-manual.html#git-concepts[Git concepts chapter of the
850 user-manual] and linkgit:gitcore-tutorial[7].
852 A Git project normally consists of a working directory with a ".git"
853 subdirectory at the top level.  The .git directory contains, among other
854 things, a compressed object database representing the complete history
855 of the project, an "index" file which links that history to the current
856 contents of the working tree, and named pointers into that history such
857 as tags and branch heads.
859 The object database contains objects of three main types: blobs, which
860 hold file data; trees, which point to blobs and other trees to build up
861 directory hierarchies; and commits, which each reference a single tree
862 and some number of parent commits.
864 The commit, equivalent to what other systems call a "changeset" or
865 "version", represents a step in the project's history, and each parent
866 represents an immediately preceding step.  Commits with more than one
867 parent represent merges of independent lines of development.
869 All objects are named by the SHA-1 hash of their contents, normally
870 written as a string of 40 hex digits.  Such names are globally unique.
871 The entire history leading up to a commit can be vouched for by signing
872 just that commit.  A fourth object type, the tag, is provided for this
873 purpose.
875 When first created, objects are stored in individual files, but for
876 efficiency may later be compressed together into "pack files".
878 Named pointers called refs mark interesting points in history.  A ref
879 may contain the SHA-1 name of an object or the name of another ref.  Refs
880 with names beginning `ref/head/` contain the SHA-1 name of the most
881 recent commit (or "head") of a branch under development.  SHA-1 names of
882 tags of interest are stored under `ref/tags/`.  A special ref named
883 `HEAD` contains the name of the currently checked-out branch.
885 The index file is initialized with a list of all paths and, for each
886 path, a blob object and a set of attributes.  The blob object represents
887 the contents of the file as of the head of the current branch.  The
888 attributes (last modified time, size, etc.) are taken from the
889 corresponding file in the working tree.  Subsequent changes to the
890 working tree can be found by comparing these attributes.  The index may
891 be updated with new content, and new commits may be created from the
892 content stored in the index.
894 The index is also capable of storing multiple entries (called "stages")
895 for a given pathname.  These stages are used to hold the various
896 unmerged version of a file when a merge is in progress.
898 FURTHER DOCUMENTATION
899 ---------------------
901 See the references in the "description" section to get started
902 using Git.  The following is probably more detail than necessary
903 for a first-time user.
905 The link:user-manual.html#git-concepts[Git concepts chapter of the
906 user-manual] and linkgit:gitcore-tutorial[7] both provide
907 introductions to the underlying Git architecture.
909 See linkgit:gitworkflows[7] for an overview of recommended workflows.
911 See also the link:howto-index.html[howto] documents for some useful
912 examples.
914 The internals are documented in the
915 link:technical/api-index.html[Git API documentation].
917 Users migrating from CVS may also want to
918 read linkgit:gitcvs-migration[7].
921 Authors
922 -------
923 Git was started by Linus Torvalds, and is currently maintained by Junio
924 C Hamano. Numerous contributions have come from the Git mailing list
925 <git@vger.kernel.org>.  http://www.ohloh.net/p/git/contributors/summary
926 gives you a more complete list of contributors.
928 If you have a clone of git.git itself, the
929 output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
930 the authors for specific parts of the project.
932 Reporting Bugs
933 --------------
935 Report bugs to the Git mailing list <git@vger.kernel.org> where the
936 development and maintenance is primarily done.  You do not have to be
937 subscribed to the list to send a message there.
939 SEE ALSO
940 --------
941 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
942 link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
943 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
944 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
945 linkgit:gitworkflows[7]
949 Part of the linkgit:git[1] suite