]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git.txt
Merge branch 'jc/maint-am-abort-safely'
[thirdparty/git.git] / Documentation / git.txt
1 git(1)
2 ======
3
4 NAME
5 ----
6 git - the stupid content tracker
7
8
9 SYNOPSIS
10 --------
11 [verse]
12 'git' [--version] [--exec-path[=<path>]] [--html-path]
13 [-p|--paginate|--no-pager] [--no-replace-objects]
14 [--bare] [--git-dir=<path>] [--work-tree=<path>]
15 [-c <name>=<value>]
16 [--help] <command> [<args>]
17
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.
23
24 See linkgit:gittutorial[7] to get started, then see
25 link:everyday.html[Everyday Git] for a useful minimum set of commands, and
26 "man git-commandname" for documentation of each command. CVS users may
27 also want to read linkgit:gitcvs-migration[7]. See
28 the link:user-manual.html[Git User's Manual] for a more in-depth
29 introduction.
30
31 The '<command>' is either a name of a Git command (see below) or an alias
32 as defined in the configuration file (see linkgit:git-config[1]).
33
34 Formatted and hyperlinked version of the latest git
35 documentation can be viewed at
36 `http://www.kernel.org/pub/software/scm/git/docs/`.
37
38 ifdef::stalenotes[]
39 [NOTE]
40 ============
41
42 You are reading the documentation for the latest (possibly
43 unreleased) version of git, that is available from 'master'
44 branch of the `git.git` repository.
45 Documentation for older releases are available here:
46
47 * link:v1.7.3.4/git.html[documentation for release 1.7.3.4]
48
49 * release notes for
50 link:RelNotes/1.7.3.4.txt[1.7.3.4],
51 link:RelNotes/1.7.3.3.txt[1.7.3.3],
52 link:RelNotes/1.7.3.2.txt[1.7.3.2],
53 link:RelNotes/1.7.3.1.txt[1.7.3.1],
54 link:RelNotes/1.7.3.txt[1.7.3].
55
56 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
57
58 * release notes for
59 link:RelNotes/1.7.2.5.txt[1.7.2.5],
60 link:RelNotes/1.7.2.4.txt[1.7.2.4],
61 link:RelNotes/1.7.2.3.txt[1.7.2.3],
62 link:RelNotes/1.7.2.2.txt[1.7.2.2],
63 link:RelNotes/1.7.2.1.txt[1.7.2.1],
64 link:RelNotes/1.7.2.txt[1.7.2].
65
66 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
67
68 * release notes for
69 link:RelNotes/1.7.1.4.txt[1.7.1.4],
70 link:RelNotes/1.7.1.3.txt[1.7.1.3],
71 link:RelNotes/1.7.1.2.txt[1.7.1.2],
72 link:RelNotes/1.7.1.1.txt[1.7.1.1],
73 link:RelNotes/1.7.1.txt[1.7.1].
74
75 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
76
77 * release notes for
78 link:RelNotes/1.7.0.9.txt[1.7.0.9],
79 link:RelNotes/1.7.0.8.txt[1.7.0.8],
80 link:RelNotes/1.7.0.7.txt[1.7.0.7],
81 link:RelNotes/1.7.0.6.txt[1.7.0.6],
82 link:RelNotes/1.7.0.5.txt[1.7.0.5],
83 link:RelNotes/1.7.0.4.txt[1.7.0.4],
84 link:RelNotes/1.7.0.3.txt[1.7.0.3],
85 link:RelNotes/1.7.0.2.txt[1.7.0.2],
86 link:RelNotes/1.7.0.1.txt[1.7.0.1],
87 link:RelNotes/1.7.0.txt[1.7.0].
88
89 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
90
91 * release notes for
92 link:RelNotes/1.6.6.3.txt[1.6.6.3],
93 link:RelNotes/1.6.6.2.txt[1.6.6.2],
94 link:RelNotes/1.6.6.1.txt[1.6.6.1],
95 link:RelNotes/1.6.6.txt[1.6.6].
96
97 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
98
99 * release notes for
100 link:RelNotes/1.6.5.9.txt[1.6.5.9],
101 link:RelNotes/1.6.5.8.txt[1.6.5.8],
102 link:RelNotes/1.6.5.7.txt[1.6.5.7],
103 link:RelNotes/1.6.5.6.txt[1.6.5.6],
104 link:RelNotes/1.6.5.5.txt[1.6.5.5],
105 link:RelNotes/1.6.5.4.txt[1.6.5.4],
106 link:RelNotes/1.6.5.3.txt[1.6.5.3],
107 link:RelNotes/1.6.5.2.txt[1.6.5.2],
108 link:RelNotes/1.6.5.1.txt[1.6.5.1],
109 link:RelNotes/1.6.5.txt[1.6.5].
110
111 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
112
113 * release notes for
114 link:RelNotes/1.6.4.5.txt[1.6.4.5],
115 link:RelNotes/1.6.4.4.txt[1.6.4.4],
116 link:RelNotes/1.6.4.3.txt[1.6.4.3],
117 link:RelNotes/1.6.4.2.txt[1.6.4.2],
118 link:RelNotes/1.6.4.1.txt[1.6.4.1],
119 link:RelNotes/1.6.4.txt[1.6.4].
120
121 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
122
123 * release notes for
124 link:RelNotes/1.6.3.4.txt[1.6.3.4],
125 link:RelNotes/1.6.3.3.txt[1.6.3.3],
126 link:RelNotes/1.6.3.2.txt[1.6.3.2],
127 link:RelNotes/1.6.3.1.txt[1.6.3.1],
128 link:RelNotes/1.6.3.txt[1.6.3].
129
130 * release notes for
131 link:RelNotes/1.6.2.5.txt[1.6.2.5],
132 link:RelNotes/1.6.2.4.txt[1.6.2.4],
133 link:RelNotes/1.6.2.3.txt[1.6.2.3],
134 link:RelNotes/1.6.2.2.txt[1.6.2.2],
135 link:RelNotes/1.6.2.1.txt[1.6.2.1],
136 link:RelNotes/1.6.2.txt[1.6.2].
137
138 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
139
140 * release notes for
141 link:RelNotes/1.6.1.3.txt[1.6.1.3],
142 link:RelNotes/1.6.1.2.txt[1.6.1.2],
143 link:RelNotes/1.6.1.1.txt[1.6.1.1],
144 link:RelNotes/1.6.1.txt[1.6.1].
145
146 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
147
148 * release notes for
149 link:RelNotes/1.6.0.6.txt[1.6.0.6],
150 link:RelNotes/1.6.0.5.txt[1.6.0.5],
151 link:RelNotes/1.6.0.4.txt[1.6.0.4],
152 link:RelNotes/1.6.0.3.txt[1.6.0.3],
153 link:RelNotes/1.6.0.2.txt[1.6.0.2],
154 link:RelNotes/1.6.0.1.txt[1.6.0.1],
155 link:RelNotes/1.6.0.txt[1.6.0].
156
157 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
158
159 * release notes for
160 link:RelNotes/1.5.6.6.txt[1.5.6.6],
161 link:RelNotes/1.5.6.5.txt[1.5.6.5],
162 link:RelNotes/1.5.6.4.txt[1.5.6.4],
163 link:RelNotes/1.5.6.3.txt[1.5.6.3],
164 link:RelNotes/1.5.6.2.txt[1.5.6.2],
165 link:RelNotes/1.5.6.1.txt[1.5.6.1],
166 link:RelNotes/1.5.6.txt[1.5.6].
167
168 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
169
170 * release notes for
171 link:RelNotes/1.5.5.6.txt[1.5.5.6],
172 link:RelNotes/1.5.5.5.txt[1.5.5.5],
173 link:RelNotes/1.5.5.4.txt[1.5.5.4],
174 link:RelNotes/1.5.5.3.txt[1.5.5.3],
175 link:RelNotes/1.5.5.2.txt[1.5.5.2],
176 link:RelNotes/1.5.5.1.txt[1.5.5.1],
177 link:RelNotes/1.5.5.txt[1.5.5].
178
179 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
180
181 * release notes for
182 link:RelNotes/1.5.4.7.txt[1.5.4.7],
183 link:RelNotes/1.5.4.6.txt[1.5.4.6],
184 link:RelNotes/1.5.4.5.txt[1.5.4.5],
185 link:RelNotes/1.5.4.4.txt[1.5.4.4],
186 link:RelNotes/1.5.4.3.txt[1.5.4.3],
187 link:RelNotes/1.5.4.2.txt[1.5.4.2],
188 link:RelNotes/1.5.4.1.txt[1.5.4.1],
189 link:RelNotes/1.5.4.txt[1.5.4].
190
191 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
192
193 * release notes for
194 link:RelNotes/1.5.3.8.txt[1.5.3.8],
195 link:RelNotes/1.5.3.7.txt[1.5.3.7],
196 link:RelNotes/1.5.3.6.txt[1.5.3.6],
197 link:RelNotes/1.5.3.5.txt[1.5.3.5],
198 link:RelNotes/1.5.3.4.txt[1.5.3.4],
199 link:RelNotes/1.5.3.3.txt[1.5.3.3],
200 link:RelNotes/1.5.3.2.txt[1.5.3.2],
201 link:RelNotes/1.5.3.1.txt[1.5.3.1],
202 link:RelNotes/1.5.3.txt[1.5.3].
203
204 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
205
206 * release notes for
207 link:RelNotes/1.5.2.5.txt[1.5.2.5],
208 link:RelNotes/1.5.2.4.txt[1.5.2.4],
209 link:RelNotes/1.5.2.3.txt[1.5.2.3],
210 link:RelNotes/1.5.2.2.txt[1.5.2.2],
211 link:RelNotes/1.5.2.1.txt[1.5.2.1],
212 link:RelNotes/1.5.2.txt[1.5.2].
213
214 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
215
216 * release notes for
217 link:RelNotes/1.5.1.6.txt[1.5.1.6],
218 link:RelNotes/1.5.1.5.txt[1.5.1.5],
219 link:RelNotes/1.5.1.4.txt[1.5.1.4],
220 link:RelNotes/1.5.1.3.txt[1.5.1.3],
221 link:RelNotes/1.5.1.2.txt[1.5.1.2],
222 link:RelNotes/1.5.1.1.txt[1.5.1.1],
223 link:RelNotes/1.5.1.txt[1.5.1].
224
225 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
226
227 * release notes for
228 link:RelNotes/1.5.0.7.txt[1.5.0.7],
229 link:RelNotes/1.5.0.6.txt[1.5.0.6],
230 link:RelNotes/1.5.0.5.txt[1.5.0.5],
231 link:RelNotes/1.5.0.3.txt[1.5.0.3],
232 link:RelNotes/1.5.0.2.txt[1.5.0.2],
233 link:RelNotes/1.5.0.1.txt[1.5.0.1],
234 link:RelNotes/1.5.0.txt[1.5.0].
235
236 * documentation for release link:v1.4.4.4/git.html[1.4.4.4],
237 link:v1.3.3/git.html[1.3.3],
238 link:v1.2.6/git.html[1.2.6],
239 link:v1.0.13/git.html[1.0.13].
240
241 ============
242
243 endif::stalenotes[]
244
245 OPTIONS
246 -------
247 --version::
248 Prints the git suite version that the 'git' program came from.
249
250 --help::
251 Prints the synopsis and a list of the most commonly used
252 commands. If the option '--all' or '-a' is given then all
253 available commands are printed. If a git command is named this
254 option will bring up the manual page for that command.
255 +
256 Other options are available to control how the manual page is
257 displayed. See linkgit:git-help[1] for more information,
258 because `git --help ...` is converted internally into `git
259 help ...`.
260
261 -c <name>=<value>::
262 Pass a configuration parameter to the command. The value
263 given will override values from configuration files.
264 The <name> is expected in the same format as listed by
265 'git config' (subkeys separated by dots).
266
267 --exec-path[=<path>]::
268 Path to wherever your core git programs are installed.
269 This can also be controlled by setting the GIT_EXEC_PATH
270 environment variable. If no path is given, 'git' will print
271 the current setting and then exit.
272
273 --html-path::
274 Print the path to wherever your git HTML documentation is installed
275 and exit.
276
277 -p::
278 --paginate::
279 Pipe all output into 'less' (or if set, $PAGER) if standard
280 output is a terminal. This overrides the `pager.<cmd>`
281 configuration options (see the "Configuration Mechanism" section
282 below).
283
284 --no-pager::
285 Do not pipe git output into a pager.
286
287 --git-dir=<path>::
288 Set the path to the repository. This can also be controlled by
289 setting the GIT_DIR environment variable. It can be an absolute
290 path or relative path to current working directory.
291
292 --work-tree=<path>::
293 Set the path to the working tree. The value will not be
294 used in combination with repositories found automatically in
295 a .git directory (i.e. $GIT_DIR is not set).
296 This can also be controlled by setting the GIT_WORK_TREE
297 environment variable and the core.worktree configuration
298 variable. It can be an absolute path or relative path to
299 the directory specified by --git-dir or GIT_DIR.
300 Note: If --git-dir or GIT_DIR are specified but none of
301 --work-tree, GIT_WORK_TREE and core.worktree is specified,
302 the current working directory is regarded as the top directory
303 of your working tree.
304
305 --bare::
306 Treat the repository as a bare repository. If GIT_DIR
307 environment is not set, it is set to the current working
308 directory.
309
310 --no-replace-objects::
311 Do not use replacement refs to replace git objects. See
312 linkgit:git-replace[1] for more information.
313
314
315 FURTHER DOCUMENTATION
316 ---------------------
317
318 See the references above to get started using git. The following is
319 probably more detail than necessary for a first-time user.
320
321 The link:user-manual.html#git-concepts[git concepts chapter of the
322 user-manual] and linkgit:gitcore-tutorial[7] both provide
323 introductions to the underlying git architecture.
324
325 See linkgit:gitworkflows[7] for an overview of recommended workflows.
326
327 See also the link:howto-index.html[howto] documents for some useful
328 examples.
329
330 The internals are documented in the
331 link:technical/api-index.html[GIT API documentation].
332
333 GIT COMMANDS
334 ------------
335
336 We divide git into high level ("porcelain") commands and low level
337 ("plumbing") commands.
338
339 High-level commands (porcelain)
340 -------------------------------
341
342 We separate the porcelain commands into the main commands and some
343 ancillary user utilities.
344
345 Main porcelain commands
346 ~~~~~~~~~~~~~~~~~~~~~~~
347
348 include::cmds-mainporcelain.txt[]
349
350 Ancillary Commands
351 ~~~~~~~~~~~~~~~~~~
352 Manipulators:
353
354 include::cmds-ancillarymanipulators.txt[]
355
356 Interrogators:
357
358 include::cmds-ancillaryinterrogators.txt[]
359
360
361 Interacting with Others
362 ~~~~~~~~~~~~~~~~~~~~~~~
363
364 These commands are to interact with foreign SCM and with other
365 people via patch over e-mail.
366
367 include::cmds-foreignscminterface.txt[]
368
369
370 Low-level commands (plumbing)
371 -----------------------------
372
373 Although git includes its
374 own porcelain layer, its low-level commands are sufficient to support
375 development of alternative porcelains. Developers of such porcelains
376 might start by reading about linkgit:git-update-index[1] and
377 linkgit:git-read-tree[1].
378
379 The interface (input, output, set of options and the semantics)
380 to these low-level commands are meant to be a lot more stable
381 than Porcelain level commands, because these commands are
382 primarily for scripted use. The interface to Porcelain commands
383 on the other hand are subject to change in order to improve the
384 end user experience.
385
386 The following description divides
387 the low-level commands into commands that manipulate objects (in
388 the repository, index, and working tree), commands that interrogate and
389 compare objects, and commands that move objects and references between
390 repositories.
391
392
393 Manipulation commands
394 ~~~~~~~~~~~~~~~~~~~~~
395
396 include::cmds-plumbingmanipulators.txt[]
397
398
399 Interrogation commands
400 ~~~~~~~~~~~~~~~~~~~~~~
401
402 include::cmds-plumbinginterrogators.txt[]
403
404 In general, the interrogate commands do not touch the files in
405 the working tree.
406
407
408 Synching repositories
409 ~~~~~~~~~~~~~~~~~~~~~
410
411 include::cmds-synchingrepositories.txt[]
412
413 The following are helper commands used by the above; end users
414 typically do not use them directly.
415
416 include::cmds-synchelpers.txt[]
417
418
419 Internal helper commands
420 ~~~~~~~~~~~~~~~~~~~~~~~~
421
422 These are internal helper commands used by other commands; end
423 users typically do not use them directly.
424
425 include::cmds-purehelpers.txt[]
426
427
428 Configuration Mechanism
429 -----------------------
430
431 Starting from 0.99.9 (actually mid 0.99.8.GIT), `.git/config` file
432 is used to hold per-repository configuration options. It is a
433 simple text file modeled after `.ini` format familiar to some
434 people. Here is an example:
435
436 ------------
437 #
438 # A '#' or ';' character indicates a comment.
439 #
440
441 ; core variables
442 [core]
443 ; Don't trust file modes
444 filemode = false
445
446 ; user identity
447 [user]
448 name = "Junio C Hamano"
449 email = "junkio@twinsun.com"
450
451 ------------
452
453 Various commands read from the configuration file and adjust
454 their operation accordingly. See linkgit:git-config[1] for a
455 list.
456
457
458 Identifier Terminology
459 ----------------------
460 <object>::
461 Indicates the object name for any type of object.
462
463 <blob>::
464 Indicates a blob object name.
465
466 <tree>::
467 Indicates a tree object name.
468
469 <commit>::
470 Indicates a commit object name.
471
472 <tree-ish>::
473 Indicates a tree, commit or tag object name. A
474 command that takes a <tree-ish> argument ultimately wants to
475 operate on a <tree> object but automatically dereferences
476 <commit> and <tag> objects that point at a <tree>.
477
478 <commit-ish>::
479 Indicates a commit or tag object name. A
480 command that takes a <commit-ish> argument ultimately wants to
481 operate on a <commit> object but automatically dereferences
482 <tag> objects that point at a <commit>.
483
484 <type>::
485 Indicates that an object type is required.
486 Currently one of: `blob`, `tree`, `commit`, or `tag`.
487
488 <file>::
489 Indicates a filename - almost always relative to the
490 root of the tree structure `GIT_INDEX_FILE` describes.
491
492 Symbolic Identifiers
493 --------------------
494 Any git command accepting any <object> can also use the following
495 symbolic notation:
496
497 HEAD::
498 indicates the head of the current branch (i.e. the
499 contents of `$GIT_DIR/HEAD`).
500
501 <tag>::
502 a valid tag 'name'
503 (i.e. the contents of `$GIT_DIR/refs/tags/<tag>`).
504
505 <head>::
506 a valid head 'name'
507 (i.e. the contents of `$GIT_DIR/refs/heads/<head>`).
508
509 For a more complete list of ways to spell object names, see
510 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
511
512
513 File/Directory Structure
514 ------------------------
515
516 Please see the linkgit:gitrepository-layout[5] document.
517
518 Read linkgit:githooks[5] for more details about each hook.
519
520 Higher level SCMs may provide and manage additional information in the
521 `$GIT_DIR`.
522
523
524 Terminology
525 -----------
526 Please see linkgit:gitglossary[7].
527
528
529 Environment Variables
530 ---------------------
531 Various git commands use the following environment variables:
532
533 The git Repository
534 ~~~~~~~~~~~~~~~~~~
535 These environment variables apply to 'all' core git commands. Nb: it
536 is worth noting that they may be used/overridden by SCMS sitting above
537 git so take care if using Cogito etc.
538
539 'GIT_INDEX_FILE'::
540 This environment allows the specification of an alternate
541 index file. If not specified, the default of `$GIT_DIR/index`
542 is used.
543
544 'GIT_OBJECT_DIRECTORY'::
545 If the object storage directory is specified via this
546 environment variable then the sha1 directories are created
547 underneath - otherwise the default `$GIT_DIR/objects`
548 directory is used.
549
550 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
551 Due to the immutable nature of git objects, old objects can be
552 archived into shared, read-only directories. This variable
553 specifies a ":" separated (on Windows ";" separated) list
554 of git object directories which can be used to search for git
555 objects. New objects will not be written to these directories.
556
557 'GIT_DIR'::
558 If the 'GIT_DIR' environment variable is set then it
559 specifies a path to use instead of the default `.git`
560 for the base of the repository.
561
562 'GIT_WORK_TREE'::
563 Set the path to the working tree. The value will not be
564 used in combination with repositories found automatically in
565 a .git directory (i.e. $GIT_DIR is not set).
566 This can also be controlled by the '--work-tree' command line
567 option and the core.worktree configuration variable.
568
569 'GIT_CEILING_DIRECTORIES'::
570 This should be a colon-separated list of absolute paths.
571 If set, it is a list of directories that git should not chdir
572 up into while looking for a repository directory.
573 It will not exclude the current working directory or
574 a GIT_DIR set on the command line or in the environment.
575 (Useful for excluding slow-loading network directories.)
576
577 'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
578 When run in a directory that does not have ".git" repository
579 directory, git tries to find such a directory in the parent
580 directories to find the top of the working tree, but by default it
581 does not cross filesystem boundaries. This environment variable
582 can be set to true to tell git not to stop at filesystem
583 boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
584 an explicit repository directory set via 'GIT_DIR' or on the
585 command line.
586
587 git Commits
588 ~~~~~~~~~~~
589 'GIT_AUTHOR_NAME'::
590 'GIT_AUTHOR_EMAIL'::
591 'GIT_AUTHOR_DATE'::
592 'GIT_COMMITTER_NAME'::
593 'GIT_COMMITTER_EMAIL'::
594 'GIT_COMMITTER_DATE'::
595 'EMAIL'::
596 see linkgit:git-commit-tree[1]
597
598 git Diffs
599 ~~~~~~~~~
600 'GIT_DIFF_OPTS'::
601 Only valid setting is "--unified=??" or "-u??" to set the
602 number of context lines shown when a unified diff is created.
603 This takes precedence over any "-U" or "--unified" option
604 value passed on the git diff command line.
605
606 'GIT_EXTERNAL_DIFF'::
607 When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
608 program named by it is called, instead of the diff invocation
609 described above. For a path that is added, removed, or modified,
610 'GIT_EXTERNAL_DIFF' is called with 7 parameters:
611
612 path old-file old-hex old-mode new-file new-hex new-mode
613 +
614 where:
615
616 <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
617 contents of <old|new>,
618 <old|new>-hex:: are the 40-hexdigit SHA1 hashes,
619 <old|new>-mode:: are the octal representation of the file modes.
620
621 +
622 The file parameters can point at the user's working file
623 (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
624 when a new file is added), or a temporary file (e.g. `old-file` in the
625 index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
626 temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
627 +
628 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
629 parameter, <path>.
630
631 other
632 ~~~~~
633 'GIT_MERGE_VERBOSITY'::
634 A number controlling the amount of output shown by
635 the recursive merge strategy. Overrides merge.verbosity.
636 See linkgit:git-merge[1]
637
638 'GIT_PAGER'::
639 This environment variable overrides `$PAGER`. If it is set
640 to an empty string or to the value "cat", git will not launch
641 a pager. See also the `core.pager` option in
642 linkgit:git-config[1].
643
644 'GIT_SSH'::
645 If this environment variable is set then 'git fetch'
646 and 'git push' will use this command instead
647 of 'ssh' when they need to connect to a remote system.
648 The '$GIT_SSH' command will be given exactly two arguments:
649 the 'username@host' (or just 'host') from the URL and the
650 shell command to execute on that remote system.
651 +
652 To pass options to the program that you want to list in GIT_SSH
653 you will need to wrap the program and options into a shell script,
654 then set GIT_SSH to refer to the shell script.
655 +
656 Usually it is easier to configure any desired options through your
657 personal `.ssh/config` file. Please consult your ssh documentation
658 for further details.
659
660 'GIT_ASKPASS'::
661 If this environment variable is set, then git commands which need to
662 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
663 will call this program with a suitable prompt as command line argument
664 and read the password from its STDOUT. See also the 'core.askpass'
665 option in linkgit:git-config[1].
666
667 'GIT_FLUSH'::
668 If this environment variable is set to "1", then commands such
669 as 'git blame' (in incremental mode), 'git rev-list', 'git log',
670 and 'git whatchanged' will force a flush of the output stream
671 after each commit-oriented record have been flushed. If this
672 variable is set to "0", the output of these commands will be done
673 using completely buffered I/O. If this environment variable is
674 not set, git will choose buffered or record-oriented flushing
675 based on whether stdout appears to be redirected to a file or not.
676
677 'GIT_TRACE'::
678 If this variable is set to "1", "2" or "true" (comparison
679 is case insensitive), git will print `trace:` messages on
680 stderr telling about alias expansion, built-in command
681 execution and external command execution.
682 If this variable is set to an integer value greater than 1
683 and lower than 10 (strictly) then git will interpret this
684 value as an open file descriptor and will try to write the
685 trace messages into this file descriptor.
686 Alternatively, if this variable is set to an absolute path
687 (starting with a '/' character), git will interpret this
688 as a file path and will try to write the trace messages
689 into it.
690
691 Discussion[[Discussion]]
692 ------------------------
693
694 More detail on the following is available from the
695 link:user-manual.html#git-concepts[git concepts chapter of the
696 user-manual] and linkgit:gitcore-tutorial[7].
697
698 A git project normally consists of a working directory with a ".git"
699 subdirectory at the top level. The .git directory contains, among other
700 things, a compressed object database representing the complete history
701 of the project, an "index" file which links that history to the current
702 contents of the working tree, and named pointers into that history such
703 as tags and branch heads.
704
705 The object database contains objects of three main types: blobs, which
706 hold file data; trees, which point to blobs and other trees to build up
707 directory hierarchies; and commits, which each reference a single tree
708 and some number of parent commits.
709
710 The commit, equivalent to what other systems call a "changeset" or
711 "version", represents a step in the project's history, and each parent
712 represents an immediately preceding step. Commits with more than one
713 parent represent merges of independent lines of development.
714
715 All objects are named by the SHA1 hash of their contents, normally
716 written as a string of 40 hex digits. Such names are globally unique.
717 The entire history leading up to a commit can be vouched for by signing
718 just that commit. A fourth object type, the tag, is provided for this
719 purpose.
720
721 When first created, objects are stored in individual files, but for
722 efficiency may later be compressed together into "pack files".
723
724 Named pointers called refs mark interesting points in history. A ref
725 may contain the SHA1 name of an object or the name of another ref. Refs
726 with names beginning `ref/head/` contain the SHA1 name of the most
727 recent commit (or "head") of a branch under development. SHA1 names of
728 tags of interest are stored under `ref/tags/`. A special ref named
729 `HEAD` contains the name of the currently checked-out branch.
730
731 The index file is initialized with a list of all paths and, for each
732 path, a blob object and a set of attributes. The blob object represents
733 the contents of the file as of the head of the current branch. The
734 attributes (last modified time, size, etc.) are taken from the
735 corresponding file in the working tree. Subsequent changes to the
736 working tree can be found by comparing these attributes. The index may
737 be updated with new content, and new commits may be created from the
738 content stored in the index.
739
740 The index is also capable of storing multiple entries (called "stages")
741 for a given pathname. These stages are used to hold the various
742 unmerged version of a file when a merge is in progress.
743
744 Authors
745 -------
746 * git's founding father is Linus Torvalds <torvalds@osdl.org>.
747 * The current git nurse is Junio C Hamano <gitster@pobox.com>.
748 * The git potty was written by Andreas Ericsson <ae@op5.se>.
749 * General upbringing is handled by the git-list <git@vger.kernel.org>.
750
751 Documentation
752 --------------
753 The documentation for git suite was started by David Greaves
754 <david@dgreaves.com>, and later enhanced greatly by the
755 contributors on the git-list <git@vger.kernel.org>.
756
757 Reporting Bugs
758 --------------
759
760 Report bugs to the Git mailing list <git@vger.kernel.org> where the
761 development and maintenance is primarily done. You do not have to be
762 subscribed to the list to send a message there.
763
764 SEE ALSO
765 --------
766 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
767 link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
768 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
769 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
770 linkgit:gitworkflows[7]
771
772 GIT
773 ---
774 Part of the linkgit:git[1] suite