3 .\" Author: [see the "Authors" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.44.0.568.g436d4e5b14
10 .TH "GIT" "1" "2024\-04\-10" "Git 2\&.44\&.0\&.568\&.g436d4e" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git \- the stupid content tracker
35 \fIgit\fR [\-v | \-\-version] [\-h | \-\-help] [\-C <path>] [\-c <name>=<value>]
36 [\-\-exec\-path[=<path>]] [\-\-html\-path] [\-\-man\-path] [\-\-info\-path]
37 [\-p|\-\-paginate|\-P|\-\-no\-pager] [\-\-no\-replace\-objects] [\-\-bare]
38 [\-\-git\-dir=<path>] [\-\-work\-tree=<path>] [\-\-namespace=<name>]
39 [\-\-config\-env=<name>=<envvar>] <command> [<args>]
44 Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high\-level operations and full access to internals\&.
46 See \fBgittutorial\fR(7) to get started, then see \fBgiteveryday\fR(7) for a useful minimum set of commands\&. The \m[blue]\fBGit User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2 has a more in\-depth introduction\&.
48 After you mastered the basic concepts, you can come back to this page to learn what commands Git offers\&. You can learn more about individual Git commands with "git help command"\&. \fBgitcli\fR(7) manual page gives you an overview of the command\-line command syntax\&.
50 A formatted and hyperlinked copy of the latest Git documentation can be viewed at \m[blue]\fBhttps://git\&.github\&.io/htmldocs/git\&.html\fR\m[] or \m[blue]\fBhttps://git\-scm\&.com/docs\fR\m[]\&.
55 Prints the Git suite version that the
59 This option is internally converted to
60 \fBgit version \&.\&.\&.\fR
61 and accepts the same options as the
65 is also given, it takes precedence over
71 Prints the synopsis and a list of the most commonly used commands\&. If the option
75 is given then all available commands are printed\&. If a Git command is named this option will bring up the manual page for that command\&.
77 Other options are available to control how the manual page is displayed\&. See
79 for more information, because
80 \fBgit \-\-help \&.\&.\&.\fR
81 is converted internally into
82 \fBgit help \&.\&.\&.\fR\&.
87 Run as if git was started in
89 instead of the current working directory\&. When multiple
91 options are given, each subsequent non\-absolute
93 is interpreted relative to the preceding
94 \fB\-C <path>\fR\&. If
96 is present but empty, e\&.g\&.
97 \fB\-C ""\fR, then the current working directory is left unchanged\&.
99 This option affects options that expect path name like
103 in that their interpretations of the path names would be made relative to the working directory caused by the
105 option\&. For example the following invocations are equivalent:
111 git \-\-git\-dir=a\&.git \-\-work\-tree=b \-C c status
112 git \-\-git\-dir=c/a\&.git \-\-work\-tree=c/b status
121 Pass a configuration parameter to the command\&. The value given will override values from configuration files\&. The <name> is expected in the same format as listed by
123 (subkeys separated by dots)\&.
125 Note that omitting the
128 \fBgit \-c foo\&.bar \&.\&.\&.\fR
131 to the boolean true value (just like
133 would in a config file)\&. Including the equals but with an empty value (like
134 \fBgit \-c foo\&.bar= \&.\&.\&.\fR) sets
136 to the empty string which
137 \fBgit config \-\-type=bool\fR
142 \-\-config\-env=<name>=<envvar>
145 \fB\-c <name>=<value>\fR, give configuration variable
147 a value, where <envvar> is the name of an environment variable from which to retrieve the value\&. Unlike
149 there is no shortcut for directly setting the value to an empty string, instead the environment variable itself must be set to the empty string\&. It is an error if the
151 does not exist in the environment\&.
153 may not contain an equals sign to avoid ambiguity with
157 This is useful for cases where you want to pass transitory configuration options to git, but are doing so on operating systems where other processes might be able to read your command line (e\&.g\&.
158 \fB/proc/self/cmdline\fR), but not your environment (e\&.g\&.
159 \fB/proc/self/environ\fR)\&. That behavior is the default on Linux, but may not be on your system\&.
161 Note that this might add security for variables such as
162 \fBhttp\&.extraHeader\fR
163 where the sensitive information is part of the value, but not e\&.g\&.
164 \fBurl\&.<base>\&.insteadOf\fR
165 where the sensitive information can be part of the key\&.
168 \-\-exec\-path[=<path>]
170 Path to wherever your core Git programs are installed\&. This can also be controlled by setting the GIT_EXEC_PATH environment variable\&. If no path is given,
172 will print the current setting and then exit\&.
177 Print the path, without trailing slash, where Git\(cqs HTML documentation is installed and exit\&.
182 Print the manpath (see
183 \fBman(1)\fR) for the man pages for this version of Git and exit\&.
188 Print the path where the Info files documenting this version of Git are installed and exit\&.
195 (or if set, $PAGER) if standard output is a terminal\&. This overrides the
197 configuration options (see the "Configuration Mechanism" section below)\&.
202 Do not pipe Git output into a pager\&.
207 Set the path to the repository ("\&.git" directory)\&. This can also be controlled by setting the
209 environment variable\&. It can be an absolute path or relative path to current working directory\&.
211 Specifying the location of the "\&.git" directory using this option (or
213 environment variable) turns off the repository discovery that tries to find a directory with "\&.git" subdirectory (which is how the repository and the top\-level of the working tree are discovered), and tells Git that you are at the top level of the working tree\&. If you are not at the top\-level directory of the working tree, you should tell Git where the top\-level of the working tree is, with the
214 \fB\-\-work\-tree=<path>\fR
217 environment variable)
219 If you just want to run git as if it was started in
222 \fBgit \-C <path>\fR\&.
225 \-\-work\-tree=<path>
227 Set the path to the working tree\&. It can be an absolute path or a path relative to the current working directory\&. This can also be controlled by setting the GIT_WORK_TREE environment variable and the core\&.worktree configuration variable (see core\&.worktree in
229 for a more detailed discussion)\&.
234 Set the Git namespace\&. See
235 \fBgitnamespaces\fR(7)
236 for more details\&. Equivalent to setting the
238 environment variable\&.
243 Treat the repository as a bare repository\&. If GIT_DIR environment is not set, it is set to the current working directory\&.
246 \-\-no\-replace\-objects
248 Do not use replacement refs to replace Git objects\&. This is equivalent to exporting the
249 \fBGIT_NO_REPLACE_OBJECTS\fR
250 environment variable with any value\&. See
252 for more information\&.
257 Do not fetch missing objects from the promisor remote on demand\&. Useful together with
258 \fBgit cat\-file \-e <object>\fR
259 to see if the object is locally available\&. This is equivalent to setting the
260 \fBGIT_NO_LAZY_FETCH\fR
261 environment variable to
265 \-\-literal\-pathspecs
267 Treat pathspecs literally (i\&.e\&. no globbing, no pathspec magic)\&. This is equivalent to setting the
268 \fBGIT_LITERAL_PATHSPECS\fR
269 environment variable to
275 Add "glob" magic to all pathspec\&. This is equivalent to setting the
276 \fBGIT_GLOB_PATHSPECS\fR
277 environment variable to
278 \fB1\fR\&. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)"
281 \-\-noglob\-pathspecs
283 Add "literal" magic to all pathspec\&. This is equivalent to setting the
284 \fBGIT_NOGLOB_PATHSPECS\fR
285 environment variable to
286 \fB1\fR\&. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)"
291 Add "icase" magic to all pathspec\&. This is equivalent to setting the
292 \fBGIT_ICASE_PATHSPECS\fR
293 environment variable to
297 \-\-no\-optional\-locks
299 Do not perform optional operations that require locks\&. This is equivalent to setting the
300 \fBGIT_OPTIONAL_LOCKS\fR
305 \-\-list\-cmds=<group>[,<group>\&...]
307 List commands by group\&. This is an internal/experimental option and may change or be removed in the future\&. Supported groups are: builtins, parseopt (builtin commands that use parse\-options), main (all commands in libexec directory), others (all other commands in
309 that have git\- prefix), list\-<category> (see categories in command\-list\&.txt), nohelpers (exclude helper commands), alias and config (retrieve command list from config variable completion\&.commands)
312 \-\-attr\-source=<tree\-ish>
314 Read gitattributes from <tree\-ish> instead of the worktree\&. See
315 \fBgitattributes\fR(5)\&. This is equivalent to setting the
316 \fBGIT_ATTR_SOURCE\fR
317 environment variable\&.
321 We divide Git into high level ("porcelain") commands and low level ("plumbing") commands\&.
322 .SH "HIGH\-LEVEL COMMANDS (PORCELAIN)"
324 We separate the porcelain commands into the main commands and some ancillary user utilities\&.
325 .SS "Main porcelain commands"
329 Add file contents to the index\&.
334 Apply a series of patches from a mailbox\&.
339 Create an archive of files from a named tree\&.
344 Use binary search to find the commit that introduced a bug\&.
349 List, create, or delete branches\&.
354 Move objects and refs by archive\&.
357 \fBgit-checkout\fR(1)
359 Switch branches or restore working tree files\&.
362 \fBgit-cherry-pick\fR(1)
364 Apply the changes introduced by some existing commits\&.
369 Graphical alternative to git\-commit\&.
374 Remove untracked files from the working tree\&.
379 Clone a repository into a new directory\&.
384 Record changes to the repository\&.
387 \fBgit-describe\fR(1)
389 Give an object a human readable name based on an available ref\&.
394 Show changes between commits, commit and working tree, etc\&.
399 Download objects and refs from another repository\&.
402 \fBgit-format-patch\fR(1)
404 Prepare patches for e\-mail submission\&.
409 Cleanup unnecessary files and optimize the local repository\&.
414 Print lines matching a pattern\&.
419 A portable graphical interface to Git\&.
424 Create an empty Git repository or reinitialize an existing one\&.
432 \fBgit-maintenance\fR(1)
434 Run tasks to optimize Git repository data\&.
439 Join two or more development histories together\&.
444 Move or rename a file, a directory, or a symlink\&.
449 Add or inspect object notes\&.
454 Fetch from and integrate with another repository or a local branch\&.
459 Update remote refs along with associated objects\&.
462 \fBgit-range-diff\fR(1)
464 Compare two commit ranges (e\&.g\&. two versions of a branch)\&.
469 Reapply commits on top of another base tip\&.
474 Reset current HEAD to the specified state\&.
479 Restore working tree files\&.
484 Revert some existing commits\&.
489 Remove files from the working tree and from the index\&.
492 \fBgit-shortlog\fR(1)
501 Show various types of objects\&.
504 \fBgit-sparse-checkout\fR(1)
506 Reduce your working tree to a subset of tracked files\&.
511 Stash the changes in a dirty working directory away\&.
516 Show the working tree status\&.
519 \fBgit-submodule\fR(1)
521 Initialize, update or inspect submodules\&.
531 Create, list, delete or verify a tag object signed with GPG\&.
534 \fBgit-worktree\fR(1)
536 Manage multiple working trees\&.
541 The Git repository browser\&.
546 A tool for managing large Git repositories\&.
548 .SS "Ancillary Commands"
554 Get and set repository or global options\&.
557 \fBgit-fast-export\fR(1)
562 \fBgit-fast-import\fR(1)
564 Backend for fast Git data importers\&.
567 \fBgit-filter-branch\fR(1)
572 \fBgit-mergetool\fR(1)
574 Run merge conflict resolution tools to resolve merge conflicts\&.
577 \fBgit-pack-refs\fR(1)
579 Pack heads and tags for efficient repository access\&.
584 Prune all unreachable objects from the object database\&.
589 Manage reflog information\&.
594 Manage set of tracked repositories\&.
599 Pack unpacked objects in a repository\&.
604 Create, list, delete refs to replace objects\&.
609 \fBgit-annotate\fR(1)
611 Annotate file lines with commit information\&.
616 Show what revision and author last modified each line of a file\&.
619 \fBgit-bugreport\fR(1)
621 Collect information for user to file a bug report\&.
624 \fBgit-count-objects\fR(1)
626 Count unpacked number of objects and their disk consumption\&.
629 \fBgit-diagnose\fR(1)
631 Generate a zip archive of diagnostic information\&.
634 \fBgit-difftool\fR(1)
636 Show changes using common diff tools\&.
641 Verifies the connectivity and validity of the objects in the database\&.
646 Display help information about Git\&.
649 \fBgit-instaweb\fR(1)
651 Instantly browse your working repository in gitweb\&.
654 \fBgit-merge-tree\fR(1)
656 Perform merge without touching index or working tree\&.
661 Reuse recorded resolution of conflicted merges\&.
664 \fBgit-show-branch\fR(1)
666 Show branches and their commits\&.
669 \fBgit-verify-commit\fR(1)
671 Check the GPG signature of commits\&.
674 \fBgit-verify-tag\fR(1)
676 Check the GPG signature of tags\&.
681 Display version information about Git\&.
684 \fBgit-whatchanged\fR(1)
686 Show logs with differences each commit introduces\&.
691 Git web interface (web frontend to Git repositories)\&.
693 .SS "Interacting with Others"
695 These commands are to interact with foreign SCM and with other people via patch over e\-mail\&.
697 \fBgit-archimport\fR(1)
699 Import a GNU Arch repository into Git\&.
702 \fBgit-cvsexportcommit\fR(1)
704 Export a single commit to a CVS checkout\&.
707 \fBgit-cvsimport\fR(1)
709 Salvage your data out of another SCM people love to hate\&.
712 \fBgit-cvsserver\fR(1)
714 A CVS server emulator for Git\&.
717 \fBgit-imap-send\fR(1)
719 Send a collection of patches from stdin to an IMAP folder\&.
724 Import from and submit to Perforce repositories\&.
727 \fBgit-quiltimport\fR(1)
729 Applies a quilt patchset onto the current branch\&.
732 \fBgit-request-pull\fR(1)
734 Generates a summary of pending changes\&.
737 \fBgit-send-email\fR(1)
739 Send a collection of patches as emails\&.
744 Bidirectional operation between a Subversion repository and Git\&.
746 .SS "Reset, restore and revert"
748 There are three commands with similar names: \fBgit reset\fR, \fBgit restore\fR and \fBgit revert\fR\&.
759 is about making a new commit that reverts the changes made by other commits\&.
771 is about restoring files in the working tree from either the index or another commit\&. This command does not update your branch\&. The command can also be used to restore files in the index from another commit\&.
783 is about updating your branch, moving the tip in order to add or remove commits from the branch\&. This operation changes the commit history\&.
786 can also be used to restore the index, overlapping with
789 .SH "LOW\-LEVEL COMMANDS (PLUMBING)"
791 Although Git includes its own porcelain layer, its low\-level commands are sufficient to support development of alternative porcelains\&. Developers of such porcelains might start by reading about \fBgit-update-index\fR(1) and \fBgit-read-tree\fR(1)\&.
793 The interface (input, output, set of options and the semantics) to these low\-level commands are meant to be a lot more stable than Porcelain level commands, because these commands are primarily for scripted use\&. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience\&.
795 The following description divides the low\-level commands into commands that manipulate objects (in the repository, index, and working tree), commands that interrogate and compare objects, and commands that move objects and references between repositories\&.
796 .SS "Manipulation commands"
800 Apply a patch to files and/or to the index\&.
803 \fBgit-checkout-index\fR(1)
805 Copy files from the index to the working tree\&.
808 \fBgit-commit-graph\fR(1)
810 Write and verify Git commit\-graph files\&.
813 \fBgit-commit-tree\fR(1)
815 Create a new commit object\&.
818 \fBgit-hash-object\fR(1)
820 Compute object ID and optionally create an object from a file\&.
823 \fBgit-index-pack\fR(1)
825 Build pack index file for an existing packed archive\&.
828 \fBgit-merge-file\fR(1)
830 Run a three\-way file merge\&.
833 \fBgit-merge-index\fR(1)
835 Run a merge for files needing merging\&.
840 Creates a tag object with extra validation\&.
845 Build a tree\-object from ls\-tree formatted text\&.
848 \fBgit-multi-pack-index\fR(1)
850 Write and verify multi\-pack\-indexes\&.
853 \fBgit-pack-objects\fR(1)
855 Create a packed archive of objects\&.
858 \fBgit-prune-packed\fR(1)
860 Remove extra objects that are already in pack files\&.
863 \fBgit-read-tree\fR(1)
865 Reads tree information into the index\&.
870 EXPERIMENTAL: Replay commits on a new base, works with bare repos too\&.
873 \fBgit-symbolic-ref\fR(1)
875 Read, modify and delete symbolic refs\&.
878 \fBgit-unpack-objects\fR(1)
880 Unpack objects from a packed archive\&.
883 \fBgit-update-index\fR(1)
885 Register file contents in the working tree to the index\&.
888 \fBgit-update-ref\fR(1)
890 Update the object name stored in a ref safely\&.
893 \fBgit-write-tree\fR(1)
895 Create a tree object from the current index\&.
897 .SS "Interrogation commands"
899 \fBgit-cat-file\fR(1)
901 Provide contents or details of repository objects\&.
906 Find commits yet to be applied to upstream\&.
909 \fBgit-diff-files\fR(1)
911 Compares files in the working tree and the index\&.
914 \fBgit-diff-index\fR(1)
916 Compare a tree to the working tree or index\&.
919 \fBgit-diff-tree\fR(1)
921 Compares the content and mode of blobs found via two tree objects\&.
924 \fBgit-for-each-ref\fR(1)
926 Output information on each ref\&.
929 \fBgit-for-each-repo\fR(1)
931 Run a Git command on a list of repositories\&.
934 \fBgit-get-tar-commit-id\fR(1)
936 Extract commit ID from an archive created using git\-archive\&.
939 \fBgit-ls-files\fR(1)
941 Show information about files in the index and the working tree\&.
944 \fBgit-ls-remote\fR(1)
946 List references in a remote repository\&.
951 List the contents of a tree object\&.
954 \fBgit-merge-base\fR(1)
956 Find as good common ancestors as possible for a merge\&.
959 \fBgit-name-rev\fR(1)
961 Find symbolic names for given revs\&.
964 \fBgit-pack-redundant\fR(1)
966 Find redundant pack files\&.
969 \fBgit-rev-list\fR(1)
971 Lists commit objects in reverse chronological order\&.
974 \fBgit-rev-parse\fR(1)
976 Pick out and massage parameters\&.
979 \fBgit-show-index\fR(1)
981 Show packed archive index\&.
984 \fBgit-show-ref\fR(1)
986 List references in a local repository\&.
989 \fBgit-unpack-file\fR(1)
991 Creates a temporary file with a blob\(cqs contents\&.
996 Show a Git logical variable\&.
999 \fBgit-verify-pack\fR(1)
1001 Validate packed Git archive files\&.
1004 In general, the interrogate commands do not touch the files in the working tree\&.
1005 .SS "Syncing repositories"
1009 A really simple server for Git repositories\&.
1012 \fBgit-fetch-pack\fR(1)
1014 Receive missing objects from another repository\&.
1017 \fBgit-http-backend\fR(1)
1019 Server side implementation of Git over HTTP\&.
1022 \fBgit-send-pack\fR(1)
1024 Push objects over Git protocol to another repository\&.
1027 \fBgit-update-server-info\fR(1)
1029 Update auxiliary info file to help dumb servers\&.
1032 The following are helper commands used by the above; end users typically do not use them directly\&.
1034 \fBgit-http-fetch\fR(1)
1036 Download from a remote Git repository via HTTP\&.
1039 \fBgit-http-push\fR(1)
1041 Push objects over HTTP/DAV to another repository\&.
1044 \fBgit-receive-pack\fR(1)
1046 Receive what is pushed into the repository\&.
1051 Restricted login shell for Git\-only SSH access\&.
1054 \fBgit-upload-archive\fR(1)
1056 Send archive back to git\-archive\&.
1059 \fBgit-upload-pack\fR(1)
1061 Send objects packed back to git\-fetch\-pack\&.
1063 .SS "Internal helper commands"
1065 These are internal helper commands used by other commands; end users typically do not use them directly\&.
1067 \fBgit-check-attr\fR(1)
1069 Display gitattributes information\&.
1072 \fBgit-check-ignore\fR(1)
1074 Debug gitignore / exclude files\&.
1077 \fBgit-check-mailmap\fR(1)
1079 Show canonical names and email addresses of contacts\&.
1082 \fBgit-check-ref-format\fR(1)
1084 Ensures that a reference name is well formed\&.
1089 Display data in columns\&.
1092 \fBgit-credential\fR(1)
1094 Retrieve and store user credentials\&.
1097 \fBgit-credential-cache\fR(1)
1099 Helper to temporarily store passwords in memory\&.
1102 \fBgit-credential-store\fR(1)
1104 Helper to store credentials on disk\&.
1107 \fBgit-fmt-merge-msg\fR(1)
1109 Produce a merge commit message\&.
1117 \fBgit-interpret-trailers\fR(1)
1119 Add or parse structured information in commit messages\&.
1122 \fBgit-mailinfo\fR(1)
1124 Extracts patch and authorship from a single e\-mail message\&.
1127 \fBgit-mailsplit\fR(1)
1129 Simple UNIX mbox splitter program\&.
1132 \fBgit-merge-one-file\fR(1)
1134 The standard helper program to use with git\-merge\-index\&.
1137 \fBgit-patch-id\fR(1)
1139 Compute unique ID for a patch\&.
1142 \fBgit-sh-i18n\fR(1)
1144 Git\(cqs i18n setup code for shell scripts\&.
1147 \fBgit-sh-setup\fR(1)
1149 Common Git shell script setup code\&.
1152 \fBgit-stripspace\fR(1)
1154 Remove unnecessary whitespace\&.
1158 The following documentation pages are guides about Git concepts\&.
1160 \fBgitcore-tutorial\fR(7)
1162 A Git core tutorial for developers\&.
1165 \fBgitcredentials\fR(7)
1167 Providing usernames and passwords to Git\&.
1170 \fBgitcvs-migration\fR(7)
1172 Git for CVS users\&.
1175 \fBgitdiffcore\fR(7)
1177 Tweaking diff output\&.
1180 \fBgiteveryday\fR(7)
1182 A useful minimum set of commands for Everyday Git\&.
1187 Frequently asked questions about using Git\&.
1190 \fBgitglossary\fR(7)
1195 \fBgitnamespaces\fR(7)
1200 \fBgitremote-helpers\fR(7)
1202 Helper programs to interact with remote repositories\&.
1205 \fBgitsubmodules\fR(7)
1207 Mounting one repository inside another\&.
1210 \fBgittutorial\fR(7)
1212 A tutorial introduction to Git\&.
1215 \fBgittutorial-2\fR(7)
1217 A tutorial introduction to Git: part two\&.
1220 \fBgitworkflows\fR(7)
1222 An overview of recommended workflows with Git\&.
1224 .SH "REPOSITORY, COMMAND AND FILE INTERFACES"
1226 This documentation discusses repository and command interfaces which users are expected to interact with directly\&. See \fB\-\-user\-formats\fR in \fBgit-help\fR(1) for more details on the criteria\&.
1228 \fBgitattributes\fR(5)
1230 Defining attributes per path\&.
1235 Git command\-line interface and conventions\&.
1240 Hooks used by Git\&.
1245 Specifies intentionally untracked files to ignore\&.
1250 Map author/committer names and/or E\-Mail addresses\&.
1255 Defining submodule properties\&.
1258 \fBgitrepository-layout\fR(5)
1260 Git Repository Layout\&.
1263 \fBgitrevisions\fR(7)
1265 Specifying revisions and ranges for Git\&.
1267 .SH "FILE FORMATS, PROTOCOLS AND OTHER DEVELOPER INTERFACES"
1269 This documentation discusses file formats, over\-the\-wire protocols and other git developer interfaces\&. See \fB\-\-developer\-interfaces\fR in \fBgit-help\fR(1)\&.
1271 \fBgitformat-bundle\fR(5)
1273 The bundle file format\&.
1276 \fBgitformat-chunk\fR(5)
1278 Chunk\-based file formats\&.
1281 \fBgitformat-commit-graph\fR(5)
1283 Git commit\-graph format\&.
1286 \fBgitformat-index\fR(5)
1291 \fBgitformat-pack\fR(5)
1296 \fBgitformat-signature\fR(5)
1298 Git cryptographic signature formats\&.
1301 \fBgitprotocol-capabilities\fR(5)
1303 Protocol v0 and v1 capabilities\&.
1306 \fBgitprotocol-common\fR(5)
1308 Things common to various protocols\&.
1311 \fBgitprotocol-http\fR(5)
1313 Git HTTP\-based protocols\&.
1316 \fBgitprotocol-pack\fR(5)
1318 How packs are transferred over\-the\-wire\&.
1321 \fBgitprotocol-v2\fR(5)
1323 Git Wire Protocol, Version 2\&.
1325 .SH "CONFIGURATION MECHANISM"
1327 Git uses a simple text format to store customizations that are per repository and are per user\&. Such a configuration file may look like this:
1334 # A \*(Aq#\*(Aq or \*(Aq;\*(Aq character indicates a comment\&.
1339 ; Don\*(Aqt trust file modes
1344 name = "Junio C Hamano"
1345 email = "gitster@pobox\&.com"
1352 Various commands read from the configuration file and adjust their operation accordingly\&. See \fBgit-config\fR(1) for a list and more details about the configuration mechanism\&.
1353 .SH "IDENTIFIER TERMINOLOGY"
1357 Indicates the object name for any type of object\&.
1362 Indicates a blob object name\&.
1367 Indicates a tree object name\&.
1372 Indicates a commit object name\&.
1377 Indicates a tree, commit or tag object name\&. A command that takes a <tree\-ish> argument ultimately wants to operate on a <tree> object but automatically dereferences <commit> and <tag> objects that point at a <tree>\&.
1382 Indicates a commit or tag object name\&. A command that takes a <commit\-ish> argument ultimately wants to operate on a <commit> object but automatically dereferences <tag> objects that point at a <commit>\&.
1387 Indicates that an object type is required\&. Currently one of:
1396 Indicates a filename \- almost always relative to the root of the tree structure
1397 \fBGIT_INDEX_FILE\fR
1400 .SH "SYMBOLIC IDENTIFIERS"
1402 Any Git command accepting any <object> can also use the following symbolic notation:
1406 indicates the head of the current branch\&.
1414 \fBrefs/tags/<tag>\fR
1423 \fBrefs/heads/<head>\fR
1427 For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in \fBgitrevisions\fR(7)\&.
1428 .SH "FILE/DIRECTORY STRUCTURE"
1430 Please see the \fBgitrepository-layout\fR(5) document\&.
1432 Read \fBgithooks\fR(5) for more details about each hook\&.
1434 Higher level SCMs may provide and manage additional information in the \fB$GIT_DIR\fR\&.
1437 Please see \fBgitglossary\fR(7)\&.
1438 .SH "ENVIRONMENT VARIABLES"
1440 Various Git commands pay attention to environment variables and change their behavior\&. The environment variables marked as "Boolean" take their values the same way as Boolean valued configuration variables, e\&.g\&. "true", "yes", "on" and positive numbers are taken as "yes"\&.
1442 Here are the variables:
1443 .SS "The Git Repository"
1445 These environment variables apply to \fIall\fR core Git commands\&. Nb: it is worth noting that they may be used/overridden by SCMS sitting above Git so take care if using a foreign front\-end\&.
1447 \fBGIT_INDEX_FILE\fR
1449 This environment variable specifies an alternate index file\&. If not specified, the default of
1450 \fB$GIT_DIR/index\fR
1454 \fBGIT_INDEX_VERSION\fR
1456 This environment variable specifies what index version is used when writing the index file out\&. It won\(cqt affect existing index files\&. By default index file version 2 or 3 is used\&. See
1457 \fBgit-update-index\fR(1)
1458 for more information\&.
1461 \fBGIT_OBJECT_DIRECTORY\fR
1463 If the object storage directory is specified via this environment variable then the sha1 directories are created underneath \- otherwise the default
1464 \fB$GIT_DIR/objects\fR
1465 directory is used\&.
1468 \fBGIT_ALTERNATE_OBJECT_DIRECTORIES\fR
1470 Due to the immutable nature of Git objects, old objects can be archived into shared, read\-only directories\&. This variable specifies a ":" separated (on Windows ";" separated) list of Git object directories which can be used to search for Git objects\&. New objects will not be written to these directories\&.
1472 Entries that begin with
1474 (double\-quote) will be interpreted as C\-style quoted paths, removing leading and trailing double\-quotes and respecting backslash escapes\&. E\&.g\&., the value
1475 \fB"path\-with\-\e"\-and\-:\-in\-it":vanilla\-path\fR
1477 \fBpath\-with\-"\-and\-:\-in\-it\fR
1479 \fBvanilla\-path\fR\&.
1486 environment variable is set then it specifies a path to use instead of the default
1488 for the base of the repository\&. The
1490 command\-line option also sets this value\&.
1495 Set the path to the root of the working tree\&. This can also be controlled by the
1496 \fB\-\-work\-tree\fR
1497 command\-line option and the core\&.worktree configuration variable\&.
1502 Set the Git namespace; see
1503 \fBgitnamespaces\fR(7)
1506 command\-line option also sets this value\&.
1509 \fBGIT_CEILING_DIRECTORIES\fR
1511 This should be a colon\-separated list of absolute paths\&. If set, it is a list of directories that Git should not chdir up into while looking for a repository directory (useful for excluding slow\-loading network directories)\&. It will not exclude the current working directory or a GIT_DIR set on the command line or in the environment\&. Normally, Git has to read the entries in this list and resolve any symlink that might be present in order to compare them with the current directory\&. However, if even this access is slow, you can add an empty entry to the list to tell Git that the subsequent entries are not symlinks and needn\(cqt be resolved; e\&.g\&.,
1512 \fBGIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink\fR\&.
1515 \fBGIT_DISCOVERY_ACROSS_FILESYSTEM\fR
1517 When run in a directory that does not have "\&.git" repository directory, Git tries to find such a directory in the parent directories to find the top of the working tree, but by default it does not cross filesystem boundaries\&. This Boolean environment variable can be set to true to tell Git not to stop at filesystem boundaries\&. Like
1518 \fBGIT_CEILING_DIRECTORIES\fR, this will not affect an explicit repository directory set via
1520 or on the command line\&.
1523 \fBGIT_COMMON_DIR\fR
1525 If this variable is set to a path, non\-worktree files that are normally in $GIT_DIR will be taken from this path instead\&. Worktree\-specific files such as HEAD or index are taken from $GIT_DIR\&. See
1526 \fBgitrepository-layout\fR(5)
1528 \fBgit-worktree\fR(1)
1529 for details\&. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY\&...
1532 \fBGIT_DEFAULT_HASH\fR
1534 If this variable is set, the default hash algorithm for new repositories will be set to this value\&. This value is ignored when cloning and the setting of the remote repository is always used\&. The default is "sha1"\&. See
1535 \fB\-\-object\-format\fR
1537 \fBgit-init\fR(1)\&.
1540 \fBGIT_DEFAULT_REF_FORMAT\fR
1542 If this variable is set, the default reference backend format for new repositories will be set to this value\&. The default is "files"\&. See
1543 \fB\-\-ref\-format\fR
1545 \fBgit-init\fR(1)\&.
1549 \fBGIT_AUTHOR_NAME\fR
1551 The human\-readable name used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1555 configuration settings\&.
1558 \fBGIT_AUTHOR_EMAIL\fR
1560 The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1563 \fBauthor\&.email\fR
1564 configuration settings\&.
1567 \fBGIT_AUTHOR_DATE\fR
1569 The date used for the author identity when creating commit or tag objects, or when writing reflogs\&. See
1571 for valid formats\&.
1574 \fBGIT_COMMITTER_NAME\fR
1576 The human\-readable name used in the committer identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1579 \fBcommitter\&.name\fR
1580 configuration settings\&.
1583 \fBGIT_COMMITTER_EMAIL\fR
1585 The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1588 \fBcommitter\&.email\fR
1589 configuration settings\&.
1592 \fBGIT_COMMITTER_DATE\fR
1594 The date used for the committer identity when creating commit or tag objects, or when writing reflogs\&. See
1596 for valid formats\&.
1601 The email address used in the author and committer identities if no other relevant environment variable or configuration setting has been set\&.
1607 Only valid setting is "\-\-unified=??" or "\-u??" to set the number of context lines shown when a unified diff is created\&. This takes precedence over any "\-U" or "\-\-unified" option value passed on the Git diff command line\&.
1610 \fBGIT_EXTERNAL_DIFF\fR
1612 When the environment variable
1613 \fBGIT_EXTERNAL_DIFF\fR
1614 is set, the program named by it is called to generate diffs, and Git does not use its builtin diff machinery\&. For a path that is added, removed, or modified,
1615 \fBGIT_EXTERNAL_DIFF\fR
1616 is called with 7 parameters:
1622 path old\-file old\-hex old\-mode new\-file new\-hex new\-mode
1633 are files GIT_EXTERNAL_DIFF can use to read the contents of <old|new>,
1638 are the 40\-hexdigit SHA\-1 hashes,
1643 are the octal representation of the file modes\&.
1645 The file parameters can point at the user\(cqs working file (e\&.g\&.
1647 in "git\-diff\-files"),
1651 when a new file is added), or a temporary file (e\&.g\&.
1654 \fBGIT_EXTERNAL_DIFF\fR
1655 should not worry about unlinking the temporary file \(em it is removed when
1656 \fBGIT_EXTERNAL_DIFF\fR
1659 For a path that is unmerged,
1660 \fBGIT_EXTERNAL_DIFF\fR
1661 is called with 1 parameter, <path>\&.
1664 \fBGIT_EXTERNAL_DIFF\fR
1665 is called, two environment variables,
1666 \fBGIT_DIFF_PATH_COUNTER\fR
1668 \fBGIT_DIFF_PATH_TOTAL\fR
1672 \fBGIT_DIFF_PATH_COUNTER\fR
1674 A 1\-based counter incremented by one for every path\&.
1677 \fBGIT_DIFF_PATH_TOTAL\fR
1679 The total number of paths\&.
1683 \fBGIT_MERGE_VERBOSITY\fR
1685 A number controlling the amount of output shown by the recursive merge strategy\&. Overrides merge\&.verbosity\&. See
1691 This environment variable overrides
1692 \fB$PAGER\fR\&. If it is set to an empty string or to the value "cat", Git will not launch a pager\&. See also the
1695 \fBgit-config\fR(1)\&.
1698 \fBGIT_PROGRESS_DELAY\fR
1700 A number controlling how many seconds to delay before showing optional progress indicators\&. Defaults to 2\&.
1705 This environment variable overrides
1708 \fB$VISUAL\fR\&. It is used by several Git commands when, on interactive mode, an editor is to be launched\&. See also
1713 \fBgit-config\fR(1)\&.
1716 \fBGIT_SEQUENCE_EDITOR\fR
1718 This environment variable overrides the configured Git editor when editing the todo list of an interactive rebase\&. See also
1721 \fBsequence\&.editor\fR
1723 \fBgit-config\fR(1)\&.
1726 \fBGIT_SSH\fR, \fBGIT_SSH_COMMAND\fR
1728 If either of these environment variables is set then
1732 will use the specified command instead of
1734 when they need to connect to a remote system\&. The command\-line parameters passed to the configured command are determined by the ssh variant\&. See
1740 \fB$GIT_SSH_COMMAND\fR
1741 takes precedence over
1742 \fB$GIT_SSH\fR, and is interpreted by the shell, which allows additional arguments to be included\&.
1744 on the other hand must be just the path to a program (which can be a wrapper shell script, if additional arguments are needed)\&.
1746 Usually it is easier to configure any desired options through your personal
1748 file\&. Please consult your ssh documentation for further details\&.
1751 \fBGIT_SSH_VARIANT\fR
1753 If this environment variable is set, it overrides Git\(cqs autodetection whether
1754 \fBGIT_SSH\fR/\fBGIT_SSH_COMMAND\fR/\fBcore\&.sshCommand\fR
1755 refer to OpenSSH, plink or tortoiseplink\&. This variable overrides the config setting
1757 that serves the same purpose\&.
1760 \fBGIT_SSL_NO_VERIFY\fR
1762 Setting and exporting this environment variable to any value tells Git not to verify the SSL certificate when fetching or pushing over HTTPS\&.
1765 \fBGIT_ATTR_SOURCE\fR
1767 Sets the treeish that gitattributes will be read from\&.
1772 If this environment variable is set, then Git commands which need to acquire passwords or passphrases (e\&.g\&. for HTTP or IMAP authentication) will call this program with a suitable prompt as command\-line argument and read the password from its STDOUT\&. See also the
1773 \fBcore\&.askPass\fR
1775 \fBgit-config\fR(1)\&.
1778 \fBGIT_TERMINAL_PROMPT\fR
1780 If this Boolean environment variable is set to false, git will not prompt on the terminal (e\&.g\&., when asking for HTTP authentication)\&.
1783 \fBGIT_CONFIG_GLOBAL\fR, \fBGIT_CONFIG_SYSTEM\fR
1785 Take the configuration from the given files instead from global or system\-level configuration files\&. If
1786 \fBGIT_CONFIG_SYSTEM\fR
1787 is set, the system config file defined at build time (usually
1788 \fB/etc/gitconfig\fR) will not be read\&. Likewise, if
1789 \fBGIT_CONFIG_GLOBAL\fR
1791 \fB$HOME/\&.gitconfig\fR
1793 \fB$XDG_CONFIG_HOME/git/config\fR
1794 will be read\&. Can be set to
1796 to skip reading configuration files of the respective level\&.
1799 \fBGIT_CONFIG_NOSYSTEM\fR
1801 Whether to skip reading settings from the system\-wide
1802 \fB$(prefix)/etc/gitconfig\fR
1803 file\&. This Boolean environment variable can be used along with
1806 \fB$XDG_CONFIG_HOME\fR
1807 to create a predictable environment for a picky script, or you can set it to true to temporarily avoid using a buggy
1808 \fB/etc/gitconfig\fR
1809 file while waiting for someone with sufficient permissions to fix it\&.
1814 If this Boolean environment variable is set to true, then commands such as
1816 (in incremental mode),
1817 \fIgit rev\-list\fR,
1819 \fIgit check\-attr\fR
1821 \fIgit check\-ignore\fR
1822 will force a flush of the output stream after each record have been flushed\&. If this variable is set to false, the output of these commands will be done using completely buffered I/O\&. If this environment variable is not set, Git will choose buffered or record\-oriented flushing based on whether stdout appears to be redirected to a file or not\&.
1827 Enables general trace messages, e\&.g\&. alias expansion, built\-in command execution and external command execution\&.
1829 If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
1831 If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor\&.
1833 Alternatively, if the variable is set to an absolute path (starting with a
1835 character), Git will interpret this as a file path and will try to append the trace messages to it\&.
1837 Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
1840 \fBGIT_TRACE_FSMONITOR\fR
1842 Enables trace messages for the filesystem monitor extension\&. See
1844 for available trace output options\&.
1847 \fBGIT_TRACE_PACK_ACCESS\fR
1849 Enables trace messages for all accesses to any packs\&. For each access, the pack file name and an offset in the pack is recorded\&. This may be helpful for troubleshooting some pack\-related performance problems\&. See
1851 for available trace output options\&.
1854 \fBGIT_TRACE_PACKET\fR
1856 Enables trace messages for all packets coming in or out of a given program\&. This can help with debugging object negotiation or other protocol issues\&. Tracing is turned off at a packet starting with "PACK" (but see
1857 \fBGIT_TRACE_PACKFILE\fR
1860 for available trace output options\&.
1863 \fBGIT_TRACE_PACKFILE\fR
1865 Enables tracing of packfiles sent or received by a given program\&. Unlike other trace output, this trace is verbatim: no headers, and no quoting of binary data\&. You almost certainly want to direct into a file (e\&.g\&.,
1866 \fBGIT_TRACE_PACKFILE=/tmp/my\&.pack\fR) rather than displaying it on the terminal or mixing it with other trace output\&.
1868 Note that this is currently only implemented for the client side of clones and fetches\&.
1871 \fBGIT_TRACE_PERFORMANCE\fR
1873 Enables performance related trace messages, e\&.g\&. total execution time of each Git command\&. See
1875 for available trace output options\&.
1878 \fBGIT_TRACE_REFS\fR
1880 Enables trace messages for operations on the ref database\&. See
1882 for available trace output options\&.
1885 \fBGIT_TRACE_SETUP\fR
1887 Enables trace messages printing the \&.git, working tree and current working directory after Git has completed its setup phase\&. See
1889 for available trace output options\&.
1892 \fBGIT_TRACE_SHALLOW\fR
1894 Enables trace messages that can help debugging fetching / cloning of shallow repositories\&. See
1896 for available trace output options\&.
1899 \fBGIT_TRACE_CURL\fR
1901 Enables a curl full trace dump of all incoming and outgoing data, including descriptive information, of the git transport protocol\&. This is similar to doing curl
1902 \fB\-\-trace\-ascii\fR
1903 on the command line\&. See
1905 for available trace output options\&.
1908 \fBGIT_TRACE_CURL_NO_DATA\fR
1910 When a curl trace is enabled (see
1911 \fBGIT_TRACE_CURL\fR
1912 above), do not dump data (that is, only dump info lines and headers)\&.
1917 Enables more detailed trace messages from the "trace2" library\&. Output from
1919 is a simple text\-based format for human readability\&.
1921 If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
1923 If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor\&.
1925 Alternatively, if the variable is set to an absolute path (starting with a
1927 character), Git will interpret this as a file path and will try to append the trace messages to it\&. If the path already exists and is a directory, the trace messages will be written to files (one per process) in that directory, named according to the last component of the SID and an optional counter (to avoid filename collisions)\&.
1929 In addition, if the variable is set to
1930 \fBaf_unix:[<socket\-type>:]<absolute\-pathname>\fR, Git will try to open the path as a Unix Domain Socket\&. The socket type can be either
1935 Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
1938 \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
1942 \fBGIT_TRACE2_EVENT\fR
1944 This setting writes a JSON\-based format that is suited for machine interpretation\&. See
1946 for available trace output options and
1947 \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
1951 \fBGIT_TRACE2_PERF\fR
1953 In addition to the text\-based messages available in
1954 \fBGIT_TRACE2\fR, this setting writes a column\-based format for understanding nesting regions\&. See
1956 for available trace output options and
1957 \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
1961 \fBGIT_TRACE_REDACT\fR
1963 By default, when tracing is activated, Git redacts the values of cookies, the "Authorization:" header, the "Proxy\-Authorization:" header and packfile URIs\&. Set this Boolean environment variable to false to prevent this redaction\&.
1966 \fBGIT_NO_REPLACE_OBJECTS\fR
1968 Setting and exporting this environment variable tells Git to ignore replacement refs and do not replace Git objects\&.
1971 \fBGIT_LITERAL_PATHSPECS\fR
1973 Setting this Boolean environment variable to true will cause Git to treat all pathspecs literally, rather than as glob patterns\&. For example, running
1974 \fBGIT_LITERAL_PATHSPECS=1 git log \-\- \*(Aq*\&.c\*(Aq\fR
1975 will search for commits that touch the path
1976 \fB*\&.c\fR, not any paths that the glob
1978 matches\&. You might want this if you are feeding literal paths to Git (e\&.g\&., paths previously given to you by
1981 diff output, etc)\&.
1984 \fBGIT_GLOB_PATHSPECS\fR
1986 Setting this Boolean environment variable to true will cause Git to treat all pathspecs as glob patterns (aka "glob" magic)\&.
1989 \fBGIT_NOGLOB_PATHSPECS\fR
1991 Setting this Boolean environment variable to true will cause Git to treat all pathspecs as literal (aka "literal" magic)\&.
1994 \fBGIT_ICASE_PATHSPECS\fR
1996 Setting this Boolean environment variable to true will cause Git to treat all pathspecs as case\-insensitive\&.
1999 \fBGIT_NO_LAZY_FETCH\fR
2001 Setting this Boolean environment variable to true tells Git not to lazily fetch missing objects from the promisor remote on demand\&.
2004 \fBGIT_REFLOG_ACTION\fR
2006 When a ref is updated, reflog entries are created to keep track of the reason why the ref was updated (which is typically the name of the high\-level command that updated the ref), in addition to the old and new values of the ref\&. A scripted Porcelain command can use set_reflog_action helper function in
2007 \fBgit\-sh\-setup\fR
2008 to set its name to this variable when it is invoked as the top level command by the end user, to be recorded in the body of the reflog\&.
2011 \fBGIT_REF_PARANOIA\fR
2013 If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating over lists of refs\&. Normally Git will try to include any such refs, which may cause some operations to fail\&. This is usually preferable, as potentially destructive operations (e\&.g\&.,
2014 \fBgit-prune\fR(1)) are better off aborting rather than ignoring broken refs (and thus considering the history they point to as not worth saving)\&. The default value is
2016 (i\&.e\&., be paranoid about detecting and aborting all operations)\&. You should not normally need to set this to
2017 \fB0\fR, but it may be useful when trying to salvage data from a corrupted repository\&.
2020 \fBGIT_COMMIT_GRAPH_PARANOIA\fR
2022 When loading a commit object from the commit\-graph, Git performs an existence check on the object in the object database\&. This is done to avoid issues with stale commit\-graphs that contain references to already\-deleted commits, but comes with a performance penalty\&.
2024 The default is "false", which disables the aforementioned behavior\&. Setting this to "true" enables the existence check so that stale commits will never be returned from the commit\-graph at the cost of performance\&.
2027 \fBGIT_ALLOW_PROTOCOL\fR
2029 If set to a colon\-separated list of protocols, behave as if
2030 \fBprotocol\&.allow\fR
2032 \fBnever\fR, and each of the listed protocols has
2033 \fBprotocol\&.<name>\&.allow\fR
2036 (overriding any existing configuration)\&. See the description of
2037 \fBprotocol\&.allow\fR
2043 \fBGIT_PROTOCOL_FROM_USER\fR
2045 Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are configured to the
2047 state\&. This is useful to restrict recursive submodule initialization from an untrusted repository or for programs which feed potentially\-untrusted URLS to git commands\&. See
2054 For internal use only\&. Used in handshaking the wire protocol\&. Contains a colon
2056 separated list of keys with optional values
2057 \fI<key>[=<value>]\fR\&. Presence of unknown keys and values must be ignored\&.
2059 Note that servers may need to be configured to allow this variable to pass over some transports\&. It will be propagated automatically when accessing local repositories (i\&.e\&.,
2061 or a filesystem path), as well as over the
2063 protocol\&. For git\-over\-http, it should work automatically in most configurations, but see the discussion in
2064 \fBgit-http-backend\fR(1)\&. For git\-over\-ssh, the ssh server may need to be configured to allow clients to pass this variable (e\&.g\&., by using
2065 \fBAcceptEnv GIT_PROTOCOL\fR
2068 This configuration is optional\&. If the variable is not propagated, then clients will fall back to the original "v0" protocol (but may miss out on some performance improvements or features)\&. This variable currently only affects clones and fetches; it is not yet used for pushes (but may be in the future)\&.
2071 \fBGIT_OPTIONAL_LOCKS\fR
2073 If this Boolean environment variable is set to false, Git will complete any requested operation without performing any optional sub\-operations that require taking a lock\&. For example, this will prevent
2075 from refreshing the index as a side effect\&. This is useful for processes running in the background which do not want to cause lock contention with other operations on the repository\&. Defaults to
2079 \fBGIT_REDIRECT_STDIN\fR, \fBGIT_REDIRECT_STDOUT\fR, \fBGIT_REDIRECT_STDERR\fR
2081 Windows\-only: allow redirecting the standard input/output/error handles to paths specified by the environment variables\&. This is particularly useful in multi\-threaded applications where the canonical way to pass standard handles via
2082 \fBCreateProcess()\fR
2083 is not an option because it would require the handles to be marked inheritable (and consequently
2085 spawned process would inherit them, possibly blocking regular Git operations)\&. The primary intended use case is to use named pipes for communication (e\&.g\&.
2086 \fB\e\e\&.\epipe\emy\-git\-stdin\-123\fR)\&.
2088 Two special values are supported:
2090 will simply close the corresponding standard handle, and if
2091 \fBGIT_REDIRECT_STDERR\fR
2093 \fB2>&1\fR, standard error will be redirected to the same handle as standard output\&.
2096 \fBGIT_PRINT_SHA1_ELLIPSIS\fR (deprecated)
2099 \fByes\fR, print an ellipsis following an (abbreviated) SHA\-1 value\&. This affects indications of detached HEADs (\fBgit-checkout\fR(1)) and the raw diff output (\fBgit-diff\fR(1))\&. Printing an ellipsis in the cases mentioned is no longer considered adequate and support for it is likely to be removed in the foreseeable future (along with the variable)\&.
2103 More detail on the following is available from the \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[3]\d\s+2 and \fBgitcore-tutorial\fR(7)\&.
2105 A Git project normally consists of a working directory with a "\&.git" subdirectory at the top level\&. The \&.git directory contains, among other things, a compressed object database representing the complete history of the project, an "index" file which links that history to the current contents of the working tree, and named pointers into that history such as tags and branch heads\&.
2107 The object database contains objects of three main types: blobs, which hold file data; trees, which point to blobs and other trees to build up directory hierarchies; and commits, which each reference a single tree and some number of parent commits\&.
2109 The commit, equivalent to what other systems call a "changeset" or "version", represents a step in the project\(cqs history, and each parent represents an immediately preceding step\&. Commits with more than one parent represent merges of independent lines of development\&.
2111 All objects are named by the SHA\-1 hash of their contents, normally written as a string of 40 hex digits\&. Such names are globally unique\&. The entire history leading up to a commit can be vouched for by signing just that commit\&. A fourth object type, the tag, is provided for this purpose\&.
2113 When first created, objects are stored in individual files, but for efficiency may later be compressed together into "pack files"\&.
2115 Named pointers called refs mark interesting points in history\&. A ref may contain the SHA\-1 name of an object or the name of another ref (the latter is called a "symbolic ref")\&. Refs with names beginning \fBrefs/head/\fR contain the SHA\-1 name of the most recent commit (or "head") of a branch under development\&. SHA\-1 names of tags of interest are stored under \fBrefs/tags/\fR\&. A symbolic ref named \fBHEAD\fR contains the name of the currently checked\-out branch\&.
2117 The index file is initialized with a list of all paths and, for each path, a blob object and a set of attributes\&. The blob object represents the contents of the file as of the head of the current branch\&. The attributes (last modified time, size, etc\&.) are taken from the corresponding file in the working tree\&. Subsequent changes to the working tree can be found by comparing these attributes\&. The index may be updated with new content, and new commits may be created from the content stored in the index\&.
2119 The index is also capable of storing multiple entries (called "stages") for a given pathname\&. These stages are used to hold the various unmerged version of a file when a merge is in progress\&.
2120 .SH "FURTHER DOCUMENTATION"
2122 See the references in the "description" section to get started using Git\&. The following is probably more detail than necessary for a first\-time user\&.
2124 The \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[3]\d\s+2 and \fBgitcore-tutorial\fR(7) both provide introductions to the underlying Git architecture\&.
2126 See \fBgitworkflows\fR(7) for an overview of recommended workflows\&.
2128 See also the \m[blue]\fBhowto\fR\m[]\&\s-2\u[4]\d\s+2 documents for some useful examples\&.
2130 The internals are documented in the \m[blue]\fBGit API documentation\fR\m[]\&\s-2\u[5]\d\s+2\&.
2132 Users migrating from CVS may also want to read \fBgitcvs-migration\fR(7)\&.
2135 Git was started by Linus Torvalds, and is currently maintained by Junio C Hamano\&. Numerous contributions have come from the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[6]\d\s+2>\&. \m[blue]\fBhttps://openhub\&.net/p/git/contributors/summary\fR\m[] gives you a more complete list of contributors\&.
2137 If you have a clone of git\&.git itself, the output of \fBgit-shortlog\fR(1) and \fBgit-blame\fR(1) can show you the authors for specific parts of the project\&.
2138 .SH "REPORTING BUGS"
2140 Report bugs to the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[6]\d\s+2> where the development and maintenance is primarily done\&. You do not have to be subscribed to the list to send a message there\&. See the list archive at \m[blue]\fBhttps://lore\&.kernel\&.org/git\fR\m[] for previous bug reports and other discussions\&.
2142 Issues which are security relevant should be disclosed privately to the Git Security mailing list <\m[blue]\fBgit\-security@googlegroups\&.com\fR\m[]\&\s-2\u[7]\d\s+2>\&.
2145 \fBgittutorial\fR(7), \fBgittutorial-2\fR(7), \fBgiteveryday\fR(7), \fBgitcvs-migration\fR(7), \fBgitglossary\fR(7), \fBgitcore-tutorial\fR(7), \fBgitcli\fR(7), \m[blue]\fBThe Git User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2, \fBgitworkflows\fR(7)
2148 Part of the \fBgit\fR(1) suite
2151 Git User\(cqs Manual
2153 \%git-htmldocs/user-manual.html
2156 Trace2 documentation
2158 \%git-htmldocs/technical/api-trace2.html
2161 Git concepts chapter of the user-manual
2163 \%git-htmldocs/user-manual.html#git-concepts
2168 \%git-htmldocs/howto-index.html
2171 Git API documentation
2173 \%git-htmldocs/technical/api-index.html
2178 \%mailto:git@vger.kernel.org
2181 git-security@googlegroups.com
2183 \%mailto:git-security@googlegroups.com