1GIT(1)                            Git Manual                            GIT(1)
2
3
4

NAME

6       git - the stupid content tracker
7

SYNOPSIS

9       git [--version] [--help] [-C <path>] [-c <name>=<value>]
10           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
11           [-p|--paginate|-P|--no-pager] [--no-replace-objects] [--bare]
12           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
13           [--super-prefix=<path>]
14           <command> [<args>]
15
16

DESCRIPTION

18       Git is a fast, scalable, distributed revision control system with an
19       unusually rich command set that provides both high-level operations and
20       full access to internals.
21
22       See gittutorial(7) to get started, then see giteveryday(7) for a useful
23       minimum set of commands. The Git User’s Manual[1] has a more in-depth
24       introduction.
25
26       After you mastered the basic concepts, you can come back to this page
27       to learn what commands Git offers. You can learn more about individual
28       Git commands with "git help command". gitcli(7) manual page gives you
29       an overview of the command-line command syntax.
30
31       A formatted and hyperlinked copy of the latest Git documentation can be
32       viewed at https://git.github.io/htmldocs/git.html.
33

OPTIONS

35       --version
36           Prints the Git suite version that the git program came from.
37
38       --help
39           Prints the synopsis and a list of the most commonly used commands.
40           If the option --all or -a is given then all available commands are
41           printed. If a Git command is named this option will bring up the
42           manual page for that command.
43
44           Other options are available to control how the manual page is
45           displayed. See git-help(1) for more information, because git --help
46           ...  is converted internally into git help ....
47
48       -C <path>
49           Run as if git was started in <path> instead of the current working
50           directory. When multiple -C options are given, each subsequent
51           non-absolute -C <path> is interpreted relative to the preceding -C
52           <path>.
53
54           This option affects options that expect path name like --git-dir
55           and --work-tree in that their interpretations of the path names
56           would be made relative to the working directory caused by the -C
57           option. For example the following invocations are equivalent:
58
59               git --git-dir=a.git --work-tree=b -C c status
60               git --git-dir=c/a.git --work-tree=c/b status
61
62       -c <name>=<value>
63           Pass a configuration parameter to the command. The value given will
64           override values from configuration files. The <name> is expected in
65           the same format as listed by git config (subkeys separated by
66           dots).
67
68           Note that omitting the = in git -c foo.bar ...  is allowed and sets
69           foo.bar to the boolean true value (just like [foo]bar would in a
70           config file). Including the equals but with an empty value (like
71           git -c foo.bar= ...) sets foo.bar to the empty string which git
72           config --type=bool will convert to false.
73
74       --exec-path[=<path>]
75           Path to wherever your core Git programs are installed. This can
76           also be controlled by setting the GIT_EXEC_PATH environment
77           variable. If no path is given, git will print the current setting
78           and then exit.
79
80       --html-path
81           Print the path, without trailing slash, where Git’s HTML
82           documentation is installed and exit.
83
84       --man-path
85           Print the manpath (see man(1)) for the man pages for this version
86           of Git and exit.
87
88       --info-path
89           Print the path where the Info files documenting this version of Git
90           are installed and exit.
91
92       -p, --paginate
93           Pipe all output into less (or if set, $PAGER) if standard output is
94           a terminal. This overrides the pager.<cmd> configuration options
95           (see the "Configuration Mechanism" section below).
96
97       -P, --no-pager
98           Do not pipe Git output into a pager.
99
100       --git-dir=<path>
101           Set the path to the repository. This can also be controlled by
102           setting the GIT_DIR environment variable. It can be an absolute
103           path or relative path to current working directory.
104
105       --work-tree=<path>
106           Set the path to the working tree. It can be an absolute path or a
107           path relative to the current working directory. This can also be
108           controlled by setting the GIT_WORK_TREE environment variable and
109           the core.worktree configuration variable (see core.worktree in git-
110           config(1) for a more detailed discussion).
111
112       --namespace=<path>
113           Set the Git namespace. See gitnamespaces(7) for more details.
114           Equivalent to setting the GIT_NAMESPACE environment variable.
115
116       --super-prefix=<path>
117           Currently for internal use only. Set a prefix which gives a path
118           from above a repository down to its root. One use is to give
119           submodules context about the superproject that invoked it.
120
121       --bare
122           Treat the repository as a bare repository. If GIT_DIR environment
123           is not set, it is set to the current working directory.
124
125       --no-replace-objects
126           Do not use replacement refs to replace Git objects. See git-
127           replace(1) for more information.
128
129       --literal-pathspecs
130           Treat pathspecs literally (i.e. no globbing, no pathspec magic).
131           This is equivalent to setting the GIT_LITERAL_PATHSPECS environment
132           variable to 1.
133
134       --glob-pathspecs
135           Add "glob" magic to all pathspec. This is equivalent to setting the
136           GIT_GLOB_PATHSPECS environment variable to 1. Disabling globbing on
137           individual pathspecs can be done using pathspec magic ":(literal)"
138
139       --noglob-pathspecs
140           Add "literal" magic to all pathspec. This is equivalent to setting
141           the GIT_NOGLOB_PATHSPECS environment variable to 1. Enabling
142           globbing on individual pathspecs can be done using pathspec magic
143           ":(glob)"
144
145       --icase-pathspecs
146           Add "icase" magic to all pathspec. This is equivalent to setting
147           the GIT_ICASE_PATHSPECS environment variable to 1.
148
149       --no-optional-locks
150           Do not perform optional operations that require locks. This is
151           equivalent to setting the GIT_OPTIONAL_LOCKS to 0.
152
153       --list-cmds=group[,group...]
154           List commands by group. This is an internal/experimental option and
155           may change or be removed in the future. Supported groups are:
156           builtins, parseopt (builtin commands that use parse-options), main
157           (all commands in libexec directory), others (all other commands in
158           $PATH that have git- prefix), list-<category> (see categories in
159           command-list.txt), nohelpers (exclude helper commands), alias and
160           config (retrieve command list from config variable
161           completion.commands)
162

GIT COMMANDS

164       We divide Git into high level ("porcelain") commands and low level
165       ("plumbing") commands.
166

HIGH-LEVEL COMMANDS (PORCELAIN)

168       We separate the porcelain commands into the main commands and some
169       ancillary user utilities.
170
171   Main porcelain commands
172       git-add(1)
173           Add file contents to the index.
174
175       git-am(1)
176           Apply a series of patches from a mailbox.
177
178       git-archive(1)
179           Create an archive of files from a named tree.
180
181       git-bisect(1)
182           Use binary search to find the commit that introduced a bug.
183
184       git-branch(1)
185           List, create, or delete branches.
186
187       git-bundle(1)
188           Move objects and refs by archive.
189
190       git-checkout(1)
191           Switch branches or restore working tree files.
192
193       git-cherry-pick(1)
194           Apply the changes introduced by some existing commits.
195
196       git-citool(1)
197           Graphical alternative to git-commit.
198
199       git-clean(1)
200           Remove untracked files from the working tree.
201
202       git-clone(1)
203           Clone a repository into a new directory.
204
205       git-commit(1)
206           Record changes to the repository.
207
208       git-describe(1)
209           Give an object a human readable name based on an available ref.
210
211       git-diff(1)
212           Show changes between commits, commit and working tree, etc.
213
214       git-fetch(1)
215           Download objects and refs from another repository.
216
217       git-format-patch(1)
218           Prepare patches for e-mail submission.
219
220       git-gc(1)
221           Cleanup unnecessary files and optimize the local repository.
222
223       git-grep(1)
224           Print lines matching a pattern.
225
226       git-gui(1)
227           A portable graphical interface to Git.
228
229       git-init(1)
230           Create an empty Git repository or reinitialize an existing one.
231
232       git-log(1)
233           Show commit logs.
234
235       git-merge(1)
236           Join two or more development histories together.
237
238       git-mv(1)
239           Move or rename a file, a directory, or a symlink.
240
241       git-notes(1)
242           Add or inspect object notes.
243
244       git-pull(1)
245           Fetch from and integrate with another repository or a local branch.
246
247       git-push(1)
248           Update remote refs along with associated objects.
249
250       git-range-diff(1)
251           Compare two commit ranges (e.g. two versions of a branch).
252
253       git-rebase(1)
254           Reapply commits on top of another base tip.
255
256       git-reset(1)
257           Reset current HEAD to the specified state.
258
259       git-revert(1)
260           Revert some existing commits.
261
262       git-rm(1)
263           Remove files from the working tree and from the index.
264
265       git-shortlog(1)
266           Summarize git log output.
267
268       git-show(1)
269           Show various types of objects.
270
271       git-stash(1)
272           Stash the changes in a dirty working directory away.
273
274       git-status(1)
275           Show the working tree status.
276
277       git-submodule(1)
278           Initialize, update or inspect submodules.
279
280       git-tag(1)
281           Create, list, delete or verify a tag object signed with GPG.
282
283       git-worktree(1)
284           Manage multiple working trees.
285
286       gitk(1)
287           The Git repository browser.
288
289   Ancillary Commands
290       Manipulators:
291
292       git-config(1)
293           Get and set repository or global options.
294
295       git-fast-export(1)
296           Git data exporter.
297
298       git-fast-import(1)
299           Backend for fast Git data importers.
300
301       git-filter-branch(1)
302           Rewrite branches.
303
304       git-mergetool(1)
305           Run merge conflict resolution tools to resolve merge conflicts.
306
307       git-pack-refs(1)
308           Pack heads and tags for efficient repository access.
309
310       git-prune(1)
311           Prune all unreachable objects from the object database.
312
313       git-reflog(1)
314           Manage reflog information.
315
316       git-remote(1)
317           Manage set of tracked repositories.
318
319       git-repack(1)
320           Pack unpacked objects in a repository.
321
322       git-replace(1)
323           Create, list, delete refs to replace objects.
324
325       Interrogators:
326
327       git-annotate(1)
328           Annotate file lines with commit information.
329
330       git-blame(1)
331           Show what revision and author last modified each line of a file.
332
333       git-count-objects(1)
334           Count unpacked number of objects and their disk consumption.
335
336       git-difftool(1)
337           Show changes using common diff tools.
338
339       git-fsck(1)
340           Verifies the connectivity and validity of the objects in the
341           database.
342
343       git-help(1)
344           Display help information about Git.
345
346       git-instaweb(1)
347           Instantly browse your working repository in gitweb.
348
349       git-merge-tree(1)
350           Show three-way merge without touching index.
351
352       git-rerere(1)
353           Reuse recorded resolution of conflicted merges.
354
355       git-show-branch(1)
356           Show branches and their commits.
357
358       git-verify-commit(1)
359           Check the GPG signature of commits.
360
361       git-verify-tag(1)
362           Check the GPG signature of tags.
363
364       git-whatchanged(1)
365           Show logs with difference each commit introduces.
366
367       gitweb(1)
368           Git web interface (web frontend to Git repositories).
369
370   Interacting with Others
371       These commands are to interact with foreign SCM and with other people
372       via patch over e-mail.
373
374       git-cvsexportcommit(1)
375           Export a single commit to a CVS checkout.
376
377       git-cvsimport(1)
378           Salvage your data out of another SCM people love to hate.
379
380       git-cvsserver(1)
381           A CVS server emulator for Git.
382
383       git-imap-send(1)
384           Send a collection of patches from stdin to an IMAP folder.
385
386       git-quiltimport(1)
387           Applies a quilt patchset onto the current branch.
388
389       git-request-pull(1)
390           Generates a summary of pending changes.
391
392       git-send-email(1)
393           Send a collection of patches as emails.
394
395       git-svn(1)
396           Bidirectional operation between a Subversion repository and Git.
397

LOW-LEVEL COMMANDS (PLUMBING)

399       Although Git includes its own porcelain layer, its low-level commands
400       are sufficient to support development of alternative porcelains.
401       Developers of such porcelains might start by reading about git-update-
402       index(1) and git-read-tree(1).
403
404       The interface (input, output, set of options and the semantics) to
405       these low-level commands are meant to be a lot more stable than
406       Porcelain level commands, because these commands are primarily for
407       scripted use. The interface to Porcelain commands on the other hand are
408       subject to change in order to improve the end user experience.
409
410       The following description divides the low-level commands into commands
411       that manipulate objects (in the repository, index, and working tree),
412       commands that interrogate and compare objects, and commands that move
413       objects and references between repositories.
414
415   Manipulation commands
416       git-apply(1)
417           Apply a patch to files and/or to the index.
418
419       git-checkout-index(1)
420           Copy files from the index to the working tree.
421
422       git-commit-graph(1)
423           Write and verify Git commit-graph files.
424
425       git-commit-tree(1)
426           Create a new commit object.
427
428       git-hash-object(1)
429           Compute object ID and optionally creates a blob from a file.
430
431       git-index-pack(1)
432           Build pack index file for an existing packed archive.
433
434       git-merge-file(1)
435           Run a three-way file merge.
436
437       git-merge-index(1)
438           Run a merge for files needing merging.
439
440       git-mktag(1)
441           Creates a tag object.
442
443       git-mktree(1)
444           Build a tree-object from ls-tree formatted text.
445
446       git-multi-pack-index(1)
447           Write and verify multi-pack-indexes.
448
449       git-pack-objects(1)
450           Create a packed archive of objects.
451
452       git-prune-packed(1)
453           Remove extra objects that are already in pack files.
454
455       git-read-tree(1)
456           Reads tree information into the index.
457
458       git-symbolic-ref(1)
459           Read, modify and delete symbolic refs.
460
461       git-unpack-objects(1)
462           Unpack objects from a packed archive.
463
464       git-update-index(1)
465           Register file contents in the working tree to the index.
466
467       git-update-ref(1)
468           Update the object name stored in a ref safely.
469
470       git-write-tree(1)
471           Create a tree object from the current index.
472
473   Interrogation commands
474       git-cat-file(1)
475           Provide content or type and size information for repository
476           objects.
477
478       git-cherry(1)
479           Find commits yet to be applied to upstream.
480
481       git-diff-files(1)
482           Compares files in the working tree and the index.
483
484       git-diff-index(1)
485           Compare a tree to the working tree or index.
486
487       git-diff-tree(1)
488           Compares the content and mode of blobs found via two tree objects.
489
490       git-for-each-ref(1)
491           Output information on each ref.
492
493       git-get-tar-commit-id(1)
494           Extract commit ID from an archive created using git-archive.
495
496       git-ls-files(1)
497           Show information about files in the index and the working tree.
498
499       git-ls-remote(1)
500           List references in a remote repository.
501
502       git-ls-tree(1)
503           List the contents of a tree object.
504
505       git-merge-base(1)
506           Find as good common ancestors as possible for a merge.
507
508       git-name-rev(1)
509           Find symbolic names for given revs.
510
511       git-pack-redundant(1)
512           Find redundant pack files.
513
514       git-rev-list(1)
515           Lists commit objects in reverse chronological order.
516
517       git-rev-parse(1)
518           Pick out and massage parameters.
519
520       git-show-index(1)
521           Show packed archive index.
522
523       git-show-ref(1)
524           List references in a local repository.
525
526       git-unpack-file(1)
527           Creates a temporary file with a blob’s contents.
528
529       git-var(1)
530           Show a Git logical variable.
531
532       git-verify-pack(1)
533           Validate packed Git archive files.
534
535       In general, the interrogate commands do not touch the files in the
536       working tree.
537
538   Synching repositories
539       git-daemon(1)
540           A really simple server for Git repositories.
541
542       git-fetch-pack(1)
543           Receive missing objects from another repository.
544
545       git-http-backend(1)
546           Server side implementation of Git over HTTP.
547
548       git-send-pack(1)
549           Push objects over Git protocol to another repository.
550
551       git-update-server-info(1)
552           Update auxiliary info file to help dumb servers.
553
554       The following are helper commands used by the above; end users
555       typically do not use them directly.
556
557       git-http-fetch(1)
558           Download from a remote Git repository via HTTP.
559
560       git-http-push(1)
561           Push objects over HTTP/DAV to another repository.
562
563       git-parse-remote(1)
564           Routines to help parsing remote repository access parameters.
565
566       git-receive-pack(1)
567           Receive what is pushed into the repository.
568
569       git-shell(1)
570           Restricted login shell for Git-only SSH access.
571
572       git-upload-archive(1)
573           Send archive back to git-archive.
574
575       git-upload-pack(1)
576           Send objects packed back to git-fetch-pack.
577
578   Internal helper commands
579       These are internal helper commands used by other commands; end users
580       typically do not use them directly.
581
582       git-check-attr(1)
583           Display gitattributes information.
584
585       git-check-ignore(1)
586           Debug gitignore / exclude files.
587
588       git-check-mailmap(1)
589           Show canonical names and email addresses of contacts.
590
591       git-check-ref-format(1)
592           Ensures that a reference name is well formed.
593
594       git-column(1)
595           Display data in columns.
596
597       git-credential(1)
598           Retrieve and store user credentials.
599
600       git-credential-cache(1)
601           Helper to temporarily store passwords in memory.
602
603       git-credential-store(1)
604           Helper to store credentials on disk.
605
606       git-fmt-merge-msg(1)
607           Produce a merge commit message.
608
609       git-interpret-trailers(1)
610           add or parse structured information in commit messages.
611
612       git-mailinfo(1)
613           Extracts patch and authorship from a single e-mail message.
614
615       git-mailsplit(1)
616           Simple UNIX mbox splitter program.
617
618       git-merge-one-file(1)
619           The standard helper program to use with git-merge-index.
620
621       git-patch-id(1)
622           Compute unique ID for a patch.
623
624       git-sh-i18n(1)
625           Git’s i18n setup code for shell scripts.
626
627       git-sh-setup(1)
628           Common Git shell script setup code.
629
630       git-stripspace(1)
631           Remove unnecessary whitespace.
632

CONFIGURATION MECHANISM

634       Git uses a simple text format to store customizations that are per
635       repository and are per user. Such a configuration file may look like
636       this:
637
638           #
639           # A '#' or ';' character indicates a comment.
640           #
641
642           ; core variables
643           [core]
644                   ; Don't trust file modes
645                   filemode = false
646
647           ; user identity
648           [user]
649                   name = "Junio C Hamano"
650                   email = "gitster@pobox.com"
651
652
653       Various commands read from the configuration file and adjust their
654       operation accordingly. See git-config(1) for a list and more details
655       about the configuration mechanism.
656

IDENTIFIER TERMINOLOGY

658       <object>
659           Indicates the object name for any type of object.
660
661       <blob>
662           Indicates a blob object name.
663
664       <tree>
665           Indicates a tree object name.
666
667       <commit>
668           Indicates a commit object name.
669
670       <tree-ish>
671           Indicates a tree, commit or tag object name. A command that takes a
672           <tree-ish> argument ultimately wants to operate on a <tree> object
673           but automatically dereferences <commit> and <tag> objects that
674           point at a <tree>.
675
676       <commit-ish>
677           Indicates a commit or tag object name. A command that takes a
678           <commit-ish> argument ultimately wants to operate on a <commit>
679           object but automatically dereferences <tag> objects that point at a
680           <commit>.
681
682       <type>
683           Indicates that an object type is required. Currently one of: blob,
684           tree, commit, or tag.
685
686       <file>
687           Indicates a filename - almost always relative to the root of the
688           tree structure GIT_INDEX_FILE describes.
689

SYMBOLIC IDENTIFIERS

691       Any Git command accepting any <object> can also use the following
692       symbolic notation:
693
694       HEAD
695           indicates the head of the current branch.
696
697       <tag>
698           a valid tag name (i.e. a refs/tags/<tag> reference).
699
700       <head>
701           a valid head name (i.e. a refs/heads/<head> reference).
702
703       For a more complete list of ways to spell object names, see "SPECIFYING
704       REVISIONS" section in gitrevisions(7).
705

FILE/DIRECTORY STRUCTURE

707       Please see the gitrepository-layout(5) document.
708
709       Read githooks(5) for more details about each hook.
710
711       Higher level SCMs may provide and manage additional information in the
712       $GIT_DIR.
713

TERMINOLOGY

715       Please see gitglossary(7).
716

ENVIRONMENT VARIABLES

718       Various Git commands use the following environment variables:
719
720   The Git Repository
721       These environment variables apply to all core Git commands. Nb: it is
722       worth noting that they may be used/overridden by SCMS sitting above Git
723       so take care if using a foreign front-end.
724
725       GIT_INDEX_FILE
726           This environment allows the specification of an alternate index
727           file. If not specified, the default of $GIT_DIR/index is used.
728
729       GIT_INDEX_VERSION
730           This environment variable allows the specification of an index
731           version for new repositories. It won’t affect existing index files.
732           By default index file version 2 or 3 is used. See git-update-
733           index(1) for more information.
734
735       GIT_OBJECT_DIRECTORY
736           If the object storage directory is specified via this environment
737           variable then the sha1 directories are created underneath -
738           otherwise the default $GIT_DIR/objects directory is used.
739
740       GIT_ALTERNATE_OBJECT_DIRECTORIES
741           Due to the immutable nature of Git objects, old objects can be
742           archived into shared, read-only directories. This variable
743           specifies a ":" separated (on Windows ";" separated) list of Git
744           object directories which can be used to search for Git objects. New
745           objects will not be written to these directories.
746
747           Entries that begin with " (double-quote) will be interpreted as
748           C-style quoted paths, removing leading and trailing double-quotes
749           and respecting backslash escapes. E.g., the value
750           "path-with-\"-and-:-in-it":vanilla-path has two paths:
751           path-with-"-and-:-in-it and vanilla-path.
752
753       GIT_DIR
754           If the GIT_DIR environment variable is set then it specifies a path
755           to use instead of the default .git for the base of the repository.
756           The --git-dir command-line option also sets this value.
757
758       GIT_WORK_TREE
759           Set the path to the root of the working tree. This can also be
760           controlled by the --work-tree command-line option and the
761           core.worktree configuration variable.
762
763       GIT_NAMESPACE
764           Set the Git namespace; see gitnamespaces(7) for details. The
765           --namespace command-line option also sets this value.
766
767       GIT_CEILING_DIRECTORIES
768           This should be a colon-separated list of absolute paths. If set, it
769           is a list of directories that Git should not chdir up into while
770           looking for a repository directory (useful for excluding
771           slow-loading network directories). It will not exclude the current
772           working directory or a GIT_DIR set on the command line or in the
773           environment. Normally, Git has to read the entries in this list and
774           resolve any symlink that might be present in order to compare them
775           with the current directory. However, if even this access is slow,
776           you can add an empty entry to the list to tell Git that the
777           subsequent entries are not symlinks and needn’t be resolved; e.g.,
778           GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink.
779
780       GIT_DISCOVERY_ACROSS_FILESYSTEM
781           When run in a directory that does not have ".git" repository
782           directory, Git tries to find such a directory in the parent
783           directories to find the top of the working tree, but by default it
784           does not cross filesystem boundaries. This environment variable can
785           be set to true to tell Git not to stop at filesystem boundaries.
786           Like GIT_CEILING_DIRECTORIES, this will not affect an explicit
787           repository directory set via GIT_DIR or on the command line.
788
789       GIT_COMMON_DIR
790           If this variable is set to a path, non-worktree files that are
791           normally in $GIT_DIR will be taken from this path instead.
792           Worktree-specific files such as HEAD or index are taken from
793           $GIT_DIR. See gitrepository-layout(5) and git-worktree(1) for
794           details. This variable has lower precedence than other path
795           variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY...
796
797   Git Commits
798       GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME,
799       GIT_COMMITTER_EMAIL, GIT_COMMITTER_DATE, EMAIL
800           see git-commit-tree(1)
801
802   Git Diffs
803       GIT_DIFF_OPTS
804           Only valid setting is "--unified=??" or "-u??" to set the number of
805           context lines shown when a unified diff is created. This takes
806           precedence over any "-U" or "--unified" option value passed on the
807           Git diff command line.
808
809       GIT_EXTERNAL_DIFF
810           When the environment variable GIT_EXTERNAL_DIFF is set, the program
811           named by it is called, instead of the diff invocation described
812           above. For a path that is added, removed, or modified,
813           GIT_EXTERNAL_DIFF is called with 7 parameters:
814
815               path old-file old-hex old-mode new-file new-hex new-mode
816
817           where:
818
819       <old|new>-file
820           are files GIT_EXTERNAL_DIFF can use to read the contents of
821           <old|new>,
822
823       <old|new>-hex
824           are the 40-hexdigit SHA-1 hashes,
825
826       <old|new>-mode
827           are the octal representation of the file modes.
828
829           The file parameters can point at the user’s working file (e.g.
830           new-file in "git-diff-files"), /dev/null (e.g.  old-file when a new
831           file is added), or a temporary file (e.g.  old-file in the index).
832           GIT_EXTERNAL_DIFF should not worry about unlinking the temporary
833           file --- it is removed when GIT_EXTERNAL_DIFF exits.
834
835           For a path that is unmerged, GIT_EXTERNAL_DIFF is called with 1
836           parameter, <path>.
837
838           For each path GIT_EXTERNAL_DIFF is called, two environment
839           variables, GIT_DIFF_PATH_COUNTER and GIT_DIFF_PATH_TOTAL are set.
840
841       GIT_DIFF_PATH_COUNTER
842           A 1-based counter incremented by one for every path.
843
844       GIT_DIFF_PATH_TOTAL
845           The total number of paths.
846
847   other
848       GIT_MERGE_VERBOSITY
849           A number controlling the amount of output shown by the recursive
850           merge strategy. Overrides merge.verbosity. See git-merge(1)
851
852       GIT_PAGER
853           This environment variable overrides $PAGER. If it is set to an
854           empty string or to the value "cat", Git will not launch a pager.
855           See also the core.pager option in git-config(1).
856
857       GIT_EDITOR
858           This environment variable overrides $EDITOR and $VISUAL. It is used
859           by several Git commands when, on interactive mode, an editor is to
860           be launched. See also git-var(1) and the core.editor option in git-
861           config(1).
862
863       GIT_SSH, GIT_SSH_COMMAND
864           If either of these environment variables is set then git fetch and
865           git push will use the specified command instead of ssh when they
866           need to connect to a remote system. The command-line parameters
867           passed to the configured command are determined by the ssh variant.
868           See ssh.variant option in git-config(1) for details.
869
870       + $GIT_SSH_COMMAND takes precedence over $GIT_SSH, and is interpreted
871       by the shell, which allows additional arguments to be included.
872       $GIT_SSH on the other hand must be just the path to a program (which
873       can be a wrapper shell script, if additional arguments are needed).
874
875       + Usually it is easier to configure any desired options through your
876       personal .ssh/config file. Please consult your ssh documentation for
877       further details.
878
879       GIT_SSH_VARIANT
880           If this environment variable is set, it overrides Git’s
881           autodetection whether GIT_SSH/GIT_SSH_COMMAND/core.sshCommand refer
882           to OpenSSH, plink or tortoiseplink. This variable overrides the
883           config setting ssh.variant that serves the same purpose.
884
885       GIT_ASKPASS
886           If this environment variable is set, then Git commands which need
887           to acquire passwords or passphrases (e.g. for HTTP or IMAP
888           authentication) will call this program with a suitable prompt as
889           command-line argument and read the password from its STDOUT. See
890           also the core.askPass option in git-config(1).
891
892       GIT_TERMINAL_PROMPT
893           If this environment variable is set to 0, git will not prompt on
894           the terminal (e.g., when asking for HTTP authentication).
895
896       GIT_CONFIG_NOSYSTEM
897           Whether to skip reading settings from the system-wide
898           $(prefix)/etc/gitconfig file. This environment variable can be used
899           along with $HOME and $XDG_CONFIG_HOME to create a predictable
900           environment for a picky script, or you can set it temporarily to
901           avoid using a buggy /etc/gitconfig file while waiting for someone
902           with sufficient permissions to fix it.
903
904       GIT_FLUSH
905           If this environment variable is set to "1", then commands such as
906           git blame (in incremental mode), git rev-list, git log, git
907           check-attr and git check-ignore will force a flush of the output
908           stream after each record have been flushed. If this variable is set
909           to "0", the output of these commands will be done using completely
910           buffered I/O. If this environment variable is not set, Git will
911           choose buffered or record-oriented flushing based on whether stdout
912           appears to be redirected to a file or not.
913
914       GIT_TRACE
915           Enables general trace messages, e.g. alias expansion, built-in
916           command execution and external command execution.
917
918           If this variable is set to "1", "2" or "true" (comparison is case
919           insensitive), trace messages will be printed to stderr.
920
921           If the variable is set to an integer value greater than 2 and lower
922           than 10 (strictly) then Git will interpret this value as an open
923           file descriptor and will try to write the trace messages into this
924           file descriptor.
925
926           Alternatively, if the variable is set to an absolute path (starting
927           with a / character), Git will interpret this as a file path and
928           will try to append the trace messages to it.
929
930           Unsetting the variable, or setting it to empty, "0" or "false"
931           (case insensitive) disables trace messages.
932
933       GIT_TRACE_FSMONITOR
934           Enables trace messages for the filesystem monitor extension. See
935           GIT_TRACE for available trace output options.
936
937       GIT_TRACE_PACK_ACCESS
938           Enables trace messages for all accesses to any packs. For each
939           access, the pack file name and an offset in the pack is recorded.
940           This may be helpful for troubleshooting some pack-related
941           performance problems. See GIT_TRACE for available trace output
942           options.
943
944       GIT_TRACE_PACKET
945           Enables trace messages for all packets coming in or out of a given
946           program. This can help with debugging object negotiation or other
947           protocol issues. Tracing is turned off at a packet starting with
948           "PACK" (but see GIT_TRACE_PACKFILE below). See GIT_TRACE for
949           available trace output options.
950
951       GIT_TRACE_PACKFILE
952           Enables tracing of packfiles sent or received by a given program.
953           Unlike other trace output, this trace is verbatim: no headers, and
954           no quoting of binary data. You almost certainly want to direct into
955           a file (e.g., GIT_TRACE_PACKFILE=/tmp/my.pack) rather than
956           displaying it on the terminal or mixing it with other trace output.
957
958           Note that this is currently only implemented for the client side of
959           clones and fetches.
960
961       GIT_TRACE_PERFORMANCE
962           Enables performance related trace messages, e.g. total execution
963           time of each Git command. See GIT_TRACE for available trace output
964           options.
965
966       GIT_TRACE_SETUP
967           Enables trace messages printing the .git, working tree and current
968           working directory after Git has completed its setup phase. See
969           GIT_TRACE for available trace output options.
970
971       GIT_TRACE_SHALLOW
972           Enables trace messages that can help debugging fetching / cloning
973           of shallow repositories. See GIT_TRACE for available trace output
974           options.
975
976       GIT_TRACE_CURL
977           Enables a curl full trace dump of all incoming and outgoing data,
978           including descriptive information, of the git transport protocol.
979           This is similar to doing curl --trace-ascii on the command line.
980           This option overrides setting the GIT_CURL_VERBOSE environment
981           variable. See GIT_TRACE for available trace output options.
982
983       GIT_TRACE_CURL_NO_DATA
984           When a curl trace is enabled (see GIT_TRACE_CURL above), do not
985           dump data (that is, only dump info lines and headers).
986
987       GIT_REDACT_COOKIES
988           This can be set to a comma-separated list of strings. When a curl
989           trace is enabled (see GIT_TRACE_CURL above), whenever a "Cookies:"
990           header sent by the client is dumped, values of cookies whose key is
991           in that list (case-sensitive) are redacted.
992
993       GIT_LITERAL_PATHSPECS
994           Setting this variable to 1 will cause Git to treat all pathspecs
995           literally, rather than as glob patterns. For example, running
996           GIT_LITERAL_PATHSPECS=1 git log -- '*.c' will search for commits
997           that touch the path *.c, not any paths that the glob *.c matches.
998           You might want this if you are feeding literal paths to Git (e.g.,
999           paths previously given to you by git ls-tree, --raw diff output,
1000           etc).
1001
1002       GIT_GLOB_PATHSPECS
1003           Setting this variable to 1 will cause Git to treat all pathspecs as
1004           glob patterns (aka "glob" magic).
1005
1006       GIT_NOGLOB_PATHSPECS
1007           Setting this variable to 1 will cause Git to treat all pathspecs as
1008           literal (aka "literal" magic).
1009
1010       GIT_ICASE_PATHSPECS
1011           Setting this variable to 1 will cause Git to treat all pathspecs as
1012           case-insensitive.
1013
1014       GIT_REFLOG_ACTION
1015           When a ref is updated, reflog entries are created to keep track of
1016           the reason why the ref was updated (which is typically the name of
1017           the high-level command that updated the ref), in addition to the
1018           old and new values of the ref. A scripted Porcelain command can use
1019           set_reflog_action helper function in git-sh-setup to set its name
1020           to this variable when it is invoked as the top level command by the
1021           end user, to be recorded in the body of the reflog.
1022
1023       GIT_REF_PARANOIA
1024           If set to 1, include broken or badly named refs when iterating over
1025           lists of refs. In a normal, non-corrupted repository, this does
1026           nothing. However, enabling it may help git to detect and abort some
1027           operations in the presence of broken refs. Git sets this variable
1028           automatically when performing destructive operations like git-
1029           prune(1). You should not need to set it yourself unless you want to
1030           be paranoid about making sure an operation has touched every ref
1031           (e.g., because you are cloning a repository to make a backup).
1032
1033       GIT_ALLOW_PROTOCOL
1034           If set to a colon-separated list of protocols, behave as if
1035           protocol.allow is set to never, and each of the listed protocols
1036           has protocol.<name>.allow set to always (overriding any existing
1037           configuration). In other words, any protocol not mentioned will be
1038           disallowed (i.e., this is a whitelist, not a blacklist). See the
1039           description of protocol.allow in git-config(1) for more details.
1040
1041       GIT_PROTOCOL_FROM_USER
1042           Set to 0 to prevent protocols used by fetch/push/clone which are
1043           configured to the user state. This is useful to restrict recursive
1044           submodule initialization from an untrusted repository or for
1045           programs which feed potentially-untrusted URLS to git commands. See
1046           git-config(1) for more details.
1047
1048       GIT_PROTOCOL
1049           For internal use only. Used in handshaking the wire protocol.
1050           Contains a colon : separated list of keys with optional values
1051           key[=value]. Presence of unknown keys and values must be ignored.
1052
1053       GIT_OPTIONAL_LOCKS
1054           If set to 0, Git will complete any requested operation without
1055           performing any optional sub-operations that require taking a lock.
1056           For example, this will prevent git status from refreshing the index
1057           as a side effect. This is useful for processes running in the
1058           background which do not want to cause lock contention with other
1059           operations on the repository. Defaults to 1.
1060
1061       GIT_REDIRECT_STDIN, GIT_REDIRECT_STDOUT, GIT_REDIRECT_STDERR
1062           Windows-only: allow redirecting the standard input/output/error
1063           handles to paths specified by the environment variables. This is
1064           particularly useful in multi-threaded applications where the
1065           canonical way to pass standard handles via CreateProcess() is not
1066           an option because it would require the handles to be marked
1067           inheritable (and consequently every spawned process would inherit
1068           them, possibly blocking regular Git operations). The primary
1069           intended use case is to use named pipes for communication (e.g.
1070           \\.\pipe\my-git-stdin-123).
1071
1072           Two special values are supported: off will simply close the
1073           corresponding standard handle, and if GIT_REDIRECT_STDERR is 2>&1,
1074           standard error will be redirected to the same handle as standard
1075           output.
1076
1077       GIT_PRINT_SHA1_ELLIPSIS (deprecated)
1078           If set to yes, print an ellipsis following an (abbreviated) SHA-1
1079           value. This affects indications of detached HEADs (git-checkout(1))
1080           and the raw diff output (git-diff(1)). Printing an ellipsis in the
1081           cases mentioned is no longer considered adequate and support for it
1082           is likely to be removed in the foreseeable future (along with the
1083           variable).
1084

DISCUSSION

1086       More detail on the following is available from the Git concepts chapter
1087       of the user-manual[2] and gitcore-tutorial(7).
1088
1089       A Git project normally consists of a working directory with a ".git"
1090       subdirectory at the top level. The .git directory contains, among other
1091       things, a compressed object database representing the complete history
1092       of the project, an "index" file which links that history to the current
1093       contents of the working tree, and named pointers into that history such
1094       as tags and branch heads.
1095
1096       The object database contains objects of three main types: blobs, which
1097       hold file data; trees, which point to blobs and other trees to build up
1098       directory hierarchies; and commits, which each reference a single tree
1099       and some number of parent commits.
1100
1101       The commit, equivalent to what other systems call a "changeset" or
1102       "version", represents a step in the project’s history, and each parent
1103       represents an immediately preceding step. Commits with more than one
1104       parent represent merges of independent lines of development.
1105
1106       All objects are named by the SHA-1 hash of their contents, normally
1107       written as a string of 40 hex digits. Such names are globally unique.
1108       The entire history leading up to a commit can be vouched for by signing
1109       just that commit. A fourth object type, the tag, is provided for this
1110       purpose.
1111
1112       When first created, objects are stored in individual files, but for
1113       efficiency may later be compressed together into "pack files".
1114
1115       Named pointers called refs mark interesting points in history. A ref
1116       may contain the SHA-1 name of an object or the name of another ref.
1117       Refs with names beginning ref/head/ contain the SHA-1 name of the most
1118       recent commit (or "head") of a branch under development. SHA-1 names of
1119       tags of interest are stored under ref/tags/. A special ref named HEAD
1120       contains the name of the currently checked-out branch.
1121
1122       The index file is initialized with a list of all paths and, for each
1123       path, a blob object and a set of attributes. The blob object represents
1124       the contents of the file as of the head of the current branch. The
1125       attributes (last modified time, size, etc.) are taken from the
1126       corresponding file in the working tree. Subsequent changes to the
1127       working tree can be found by comparing these attributes. The index may
1128       be updated with new content, and new commits may be created from the
1129       content stored in the index.
1130
1131       The index is also capable of storing multiple entries (called "stages")
1132       for a given pathname. These stages are used to hold the various
1133       unmerged version of a file when a merge is in progress.
1134

FURTHER DOCUMENTATION

1136       See the references in the "description" section to get started using
1137       Git. The following is probably more detail than necessary for a
1138       first-time user.
1139
1140       The Git concepts chapter of the user-manual[2] and gitcore-tutorial(7)
1141       both provide introductions to the underlying Git architecture.
1142
1143       See gitworkflows(7) for an overview of recommended workflows.
1144
1145       See also the howto[3] documents for some useful examples.
1146
1147       The internals are documented in the Git API documentation[4].
1148
1149       Users migrating from CVS may also want to read gitcvs-migration(7).
1150

AUTHORS

1152       Git was started by Linus Torvalds, and is currently maintained by Junio
1153       C Hamano. Numerous contributions have come from the Git mailing list
1154       <git@vger.kernel.org[5]>.
1155       http://www.openhub.net/p/git/contributors/summary gives you a more
1156       complete list of contributors.
1157
1158       If you have a clone of git.git itself, the output of git-shortlog(1)
1159       and git-blame(1) can show you the authors for specific parts of the
1160       project.
1161

REPORTING BUGS

1163       Report bugs to the Git mailing list <git@vger.kernel.org[5]> where the
1164       development and maintenance is primarily done. You do not have to be
1165       subscribed to the list to send a message there. See the list archive at
1166       https://public-inbox.org/git for previous bug reports and other
1167       discussions.
1168
1169       Issues which are security relevant should be disclosed privately to the
1170       Git Security mailing list <git-security@googlegroups.com[6]>.
1171

SEE ALSO

1173       gittutorial(7), gittutorial-2(7), giteveryday(7), gitcvs-migration(7),
1174       gitglossary(7), gitcore-tutorial(7), gitcli(7), The Git User’s
1175       Manual[1], gitworkflows(7)
1176

GIT

1178       Part of the git(1) suite
1179

NOTES

1181        1. Git User’s Manual
1182           file:///usr/share/doc/git/user-manual.html
1183
1184        2. Git concepts chapter of the user-manual
1185           file:///usr/share/doc/git/user-manual.html#git-concepts
1186
1187        3. howto
1188           file:///usr/share/doc/git/howto-index.html
1189
1190        4. Git API documentation
1191           file:///usr/share/doc/git/technical/api-index.html
1192
1193        5. git@vger.kernel.org
1194           mailto:git@vger.kernel.org
1195
1196        6. git-security@googlegroups.com
1197           mailto:git-security@googlegroups.com
1198
1199
1200
1201Git 2.21.0                        02/24/2019                            GIT(1)
Impressum