3 .\" Author: [see the "Authors" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.47.0.rc1.33.g90fe3800b9
10 .TH "GIT" "1" "2024-10-04" "Git 2\&.47\&.0\&.rc1\&.33\&.g9" "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] [\-\-no\-lazy\-fetch]
38 [\-\-no\-optional\-locks] [\-\-no\-advice] [\-\-bare] [\-\-git\-dir=<path>]
39 [\-\-work\-tree=<path>] [\-\-namespace=<name>] [\-\-config\-env=<name>=<envvar>]
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 \-\-no\-optional\-locks
267 Do not perform optional operations that require locks\&. This is equivalent to setting the
268 \fBGIT_OPTIONAL_LOCKS\fR
275 Disable all advice hints from being printed\&.
278 \-\-literal\-pathspecs
280 Treat pathspecs literally (i\&.e\&. no globbing, no pathspec magic)\&. This is equivalent to setting the
281 \fBGIT_LITERAL_PATHSPECS\fR
282 environment variable to
288 Add "glob" magic to all pathspec\&. This is equivalent to setting the
289 \fBGIT_GLOB_PATHSPECS\fR
290 environment variable to
291 \fB1\fR\&. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)"
294 \-\-noglob\-pathspecs
296 Add "literal" magic to all pathspec\&. This is equivalent to setting the
297 \fBGIT_NOGLOB_PATHSPECS\fR
298 environment variable to
299 \fB1\fR\&. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)"
304 Add "icase" magic to all pathspec\&. This is equivalent to setting the
305 \fBGIT_ICASE_PATHSPECS\fR
306 environment variable to
310 \-\-list\-cmds=<group>[,<group>\&...\:]
312 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
314 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)
317 \-\-attr\-source=<tree\-ish>
319 Read gitattributes from <tree\-ish> instead of the worktree\&. See
320 \fBgitattributes\fR(5)\&. This is equivalent to setting the
321 \fBGIT_ATTR_SOURCE\fR
322 environment variable\&.
326 We divide Git into high level ("porcelain") commands and low level ("plumbing") commands\&.
327 .SH "HIGH\-LEVEL COMMANDS (PORCELAIN)"
329 We separate the porcelain commands into the main commands and some ancillary user utilities\&.
330 .SS "Main porcelain commands"
334 Add file contents to the index\&.
339 Apply a series of patches from a mailbox\&.
344 Create an archive of files from a named tree\&.
349 Use binary search to find the commit that introduced a bug\&.
354 List, create, or delete branches\&.
359 Move objects and refs by archive\&.
362 \fBgit-checkout\fR(1)
364 Switch branches or restore working tree files\&.
367 \fBgit-cherry-pick\fR(1)
369 Apply the changes introduced by some existing commits\&.
374 Graphical alternative to git\-commit\&.
379 Remove untracked files from the working tree\&.
384 Clone a repository into a new directory\&.
389 Record changes to the repository\&.
392 \fBgit-describe\fR(1)
394 Give an object a human readable name based on an available ref\&.
399 Show changes between commits, commit and working tree, etc\&.
404 Download objects and refs from another repository\&.
407 \fBgit-format-patch\fR(1)
409 Prepare patches for e\-mail submission\&.
414 Cleanup unnecessary files and optimize the local repository\&.
419 Print lines matching a pattern\&.
424 A portable graphical interface to Git\&.
429 Create an empty Git repository or reinitialize an existing one\&.
437 \fBgit-maintenance\fR(1)
439 Run tasks to optimize Git repository data\&.
444 Join two or more development histories together\&.
449 Move or rename a file, a directory, or a symlink\&.
454 Add or inspect object notes\&.
459 Fetch from and integrate with another repository or a local branch\&.
464 Update remote refs along with associated objects\&.
467 \fBgit-range-diff\fR(1)
469 Compare two commit ranges (e\&.g\&. two versions of a branch)\&.
474 Reapply commits on top of another base tip\&.
479 Reset current HEAD to the specified state\&.
484 Restore working tree files\&.
489 Revert some existing commits\&.
494 Remove files from the working tree and from the index\&.
497 \fBgit-shortlog\fR(1)
506 Show various types of objects\&.
509 \fBgit-sparse-checkout\fR(1)
511 Reduce your working tree to a subset of tracked files\&.
516 Stash the changes in a dirty working directory away\&.
521 Show the working tree status\&.
524 \fBgit-submodule\fR(1)
526 Initialize, update or inspect submodules\&.
536 Create, list, delete or verify a tag object signed with GPG\&.
539 \fBgit-worktree\fR(1)
541 Manage multiple working trees\&.
546 The Git repository browser\&.
551 A tool for managing large Git repositories\&.
553 .SS "Ancillary Commands"
559 Get and set repository or global options\&.
562 \fBgit-fast-export\fR(1)
567 \fBgit-fast-import\fR(1)
569 Backend for fast Git data importers\&.
572 \fBgit-filter-branch\fR(1)
577 \fBgit-mergetool\fR(1)
579 Run merge conflict resolution tools to resolve merge conflicts\&.
582 \fBgit-pack-refs\fR(1)
584 Pack heads and tags for efficient repository access\&.
589 Prune all unreachable objects from the object database\&.
594 Manage reflog information\&.
599 Low\-level access to refs\&.
604 Manage set of tracked repositories\&.
609 Pack unpacked objects in a repository\&.
614 Create, list, delete refs to replace objects\&.
619 \fBgit-annotate\fR(1)
621 Annotate file lines with commit information\&.
626 Show what revision and author last modified each line of a file\&.
629 \fBgit-bugreport\fR(1)
631 Collect information for user to file a bug report\&.
634 \fBgit-count-objects\fR(1)
636 Count unpacked number of objects and their disk consumption\&.
639 \fBgit-diagnose\fR(1)
641 Generate a zip archive of diagnostic information\&.
644 \fBgit-difftool\fR(1)
646 Show changes using common diff tools\&.
651 Verifies the connectivity and validity of the objects in the database\&.
656 Display help information about Git\&.
659 \fBgit-instaweb\fR(1)
661 Instantly browse your working repository in gitweb\&.
664 \fBgit-merge-tree\fR(1)
666 Perform merge without touching index or working tree\&.
671 Reuse recorded resolution of conflicted merges\&.
674 \fBgit-show-branch\fR(1)
676 Show branches and their commits\&.
679 \fBgit-verify-commit\fR(1)
681 Check the GPG signature of commits\&.
684 \fBgit-verify-tag\fR(1)
686 Check the GPG signature of tags\&.
691 Display version information about Git\&.
694 \fBgit-whatchanged\fR(1)
696 Show logs with differences each commit introduces\&.
701 Git web interface (web frontend to Git repositories)\&.
703 .SS "Interacting with Others"
705 These commands are to interact with foreign SCM and with other people via patch over e\-mail\&.
707 \fBgit-archimport\fR(1)
709 Import a GNU Arch repository into Git\&.
712 \fBgit-cvsexportcommit\fR(1)
714 Export a single commit to a CVS checkout\&.
717 \fBgit-cvsimport\fR(1)
719 Salvage your data out of another SCM people love to hate\&.
722 \fBgit-cvsserver\fR(1)
724 A CVS server emulator for Git\&.
727 \fBgit-imap-send\fR(1)
729 Send a collection of patches from stdin to an IMAP folder\&.
734 Import from and submit to Perforce repositories\&.
737 \fBgit-quiltimport\fR(1)
739 Applies a quilt patchset onto the current branch\&.
742 \fBgit-request-pull\fR(1)
744 Generates a summary of pending changes\&.
747 \fBgit-send-email\fR(1)
749 Send a collection of patches as emails\&.
754 Bidirectional operation between a Subversion repository and Git\&.
756 .SS "Reset, restore and revert"
758 There are three commands with similar names: \fBgit reset\fR, \fBgit restore\fR and \fBgit revert\fR\&.
769 is about making a new commit that reverts the changes made by other commits\&.
781 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\&.
793 is about updating your branch, moving the tip in order to add or remove commits from the branch\&. This operation changes the commit history\&.
796 can also be used to restore the index, overlapping with
799 .SH "LOW\-LEVEL COMMANDS (PLUMBING)"
801 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)\&.
803 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\&.
805 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\&.
806 .SS "Manipulation commands"
810 Apply a patch to files and/or to the index\&.
813 \fBgit-checkout-index\fR(1)
815 Copy files from the index to the working tree\&.
818 \fBgit-commit-graph\fR(1)
820 Write and verify Git commit\-graph files\&.
823 \fBgit-commit-tree\fR(1)
825 Create a new commit object\&.
828 \fBgit-hash-object\fR(1)
830 Compute object ID and optionally create an object from a file\&.
833 \fBgit-index-pack\fR(1)
835 Build pack index file for an existing packed archive\&.
838 \fBgit-merge-file\fR(1)
840 Run a three\-way file merge\&.
843 \fBgit-merge-index\fR(1)
845 Run a merge for files needing merging\&.
850 Creates a tag object with extra validation\&.
855 Build a tree\-object from ls\-tree formatted text\&.
858 \fBgit-multi-pack-index\fR(1)
860 Write and verify multi\-pack\-indexes\&.
863 \fBgit-pack-objects\fR(1)
865 Create a packed archive of objects\&.
868 \fBgit-prune-packed\fR(1)
870 Remove extra objects that are already in pack files\&.
873 \fBgit-read-tree\fR(1)
875 Reads tree information into the index\&.
880 EXPERIMENTAL: Replay commits on a new base, works with bare repos too\&.
883 \fBgit-symbolic-ref\fR(1)
885 Read, modify and delete symbolic refs\&.
888 \fBgit-unpack-objects\fR(1)
890 Unpack objects from a packed archive\&.
893 \fBgit-update-index\fR(1)
895 Register file contents in the working tree to the index\&.
898 \fBgit-update-ref\fR(1)
900 Update the object name stored in a ref safely\&.
903 \fBgit-write-tree\fR(1)
905 Create a tree object from the current index\&.
907 .SS "Interrogation commands"
909 \fBgit-cat-file\fR(1)
911 Provide contents or details of repository objects\&.
916 Find commits yet to be applied to upstream\&.
919 \fBgit-diff-files\fR(1)
921 Compares files in the working tree and the index\&.
924 \fBgit-diff-index\fR(1)
926 Compare a tree to the working tree or index\&.
929 \fBgit-diff-tree\fR(1)
931 Compares the content and mode of blobs found via two tree objects\&.
934 \fBgit-for-each-ref\fR(1)
936 Output information on each ref\&.
939 \fBgit-for-each-repo\fR(1)
941 Run a Git command on a list of repositories\&.
944 \fBgit-get-tar-commit-id\fR(1)
946 Extract commit ID from an archive created using git\-archive\&.
949 \fBgit-ls-files\fR(1)
951 Show information about files in the index and the working tree\&.
954 \fBgit-ls-remote\fR(1)
956 List references in a remote repository\&.
961 List the contents of a tree object\&.
964 \fBgit-merge-base\fR(1)
966 Find as good common ancestors as possible for a merge\&.
969 \fBgit-name-rev\fR(1)
971 Find symbolic names for given revs\&.
974 \fBgit-pack-redundant\fR(1)
976 Find redundant pack files\&.
979 \fBgit-rev-list\fR(1)
981 Lists commit objects in reverse chronological order\&.
984 \fBgit-rev-parse\fR(1)
986 Pick out and massage parameters\&.
989 \fBgit-show-index\fR(1)
991 Show packed archive index\&.
994 \fBgit-show-ref\fR(1)
996 List references in a local repository\&.
999 \fBgit-unpack-file\fR(1)
1001 Creates a temporary file with a blob\(cqs contents\&.
1006 Show a Git logical variable\&.
1009 \fBgit-verify-pack\fR(1)
1011 Validate packed Git archive files\&.
1014 In general, the interrogate commands do not touch the files in the working tree\&.
1015 .SS "Syncing repositories"
1019 A really simple server for Git repositories\&.
1022 \fBgit-fetch-pack\fR(1)
1024 Receive missing objects from another repository\&.
1027 \fBgit-http-backend\fR(1)
1029 Server side implementation of Git over HTTP\&.
1032 \fBgit-send-pack\fR(1)
1034 Push objects over Git protocol to another repository\&.
1037 \fBgit-update-server-info\fR(1)
1039 Update auxiliary info file to help dumb servers\&.
1042 The following are helper commands used by the above; end users typically do not use them directly\&.
1044 \fBgit-http-fetch\fR(1)
1046 Download from a remote Git repository via HTTP\&.
1049 \fBgit-http-push\fR(1)
1051 Push objects over HTTP/DAV to another repository\&.
1054 \fBgit-receive-pack\fR(1)
1056 Receive what is pushed into the repository\&.
1061 Restricted login shell for Git\-only SSH access\&.
1064 \fBgit-upload-archive\fR(1)
1066 Send archive back to git\-archive\&.
1069 \fBgit-upload-pack\fR(1)
1071 Send objects packed back to git\-fetch\-pack\&.
1073 .SS "Internal helper commands"
1075 These are internal helper commands used by other commands; end users typically do not use them directly\&.
1077 \fBgit-check-attr\fR(1)
1079 Display gitattributes information\&.
1082 \fBgit-check-ignore\fR(1)
1084 Debug gitignore / exclude files\&.
1087 \fBgit-check-mailmap\fR(1)
1089 Show canonical names and email addresses of contacts\&.
1092 \fBgit-check-ref-format\fR(1)
1094 Ensures that a reference name is well formed\&.
1099 Display data in columns\&.
1102 \fBgit-credential\fR(1)
1104 Retrieve and store user credentials\&.
1107 \fBgit-credential-cache\fR(1)
1109 Helper to temporarily store passwords in memory\&.
1112 \fBgit-credential-store\fR(1)
1114 Helper to store credentials on disk\&.
1117 \fBgit-fmt-merge-msg\fR(1)
1119 Produce a merge commit message\&.
1127 \fBgit-interpret-trailers\fR(1)
1129 Add or parse structured information in commit messages\&.
1132 \fBgit-mailinfo\fR(1)
1134 Extracts patch and authorship from a single e\-mail message\&.
1137 \fBgit-mailsplit\fR(1)
1139 Simple UNIX mbox splitter program\&.
1142 \fBgit-merge-one-file\fR(1)
1144 The standard helper program to use with git\-merge\-index\&.
1147 \fBgit-patch-id\fR(1)
1149 Compute unique ID for a patch\&.
1152 \fBgit-sh-i18n\fR(1)
1154 Git\(cqs i18n setup code for shell scripts\&.
1157 \fBgit-sh-setup\fR(1)
1159 Common Git shell script setup code\&.
1162 \fBgit-stripspace\fR(1)
1164 Remove unnecessary whitespace\&.
1168 The following documentation pages are guides about Git concepts\&.
1170 \fBgitcore-tutorial\fR(7)
1172 A Git core tutorial for developers\&.
1175 \fBgitcredentials\fR(7)
1177 Providing usernames and passwords to Git\&.
1180 \fBgitcvs-migration\fR(7)
1182 Git for CVS users\&.
1185 \fBgitdiffcore\fR(7)
1187 Tweaking diff output\&.
1190 \fBgiteveryday\fR(7)
1192 A useful minimum set of commands for Everyday Git\&.
1197 Frequently asked questions about using Git\&.
1200 \fBgitglossary\fR(7)
1205 \fBgitnamespaces\fR(7)
1210 \fBgitremote-helpers\fR(7)
1212 Helper programs to interact with remote repositories\&.
1215 \fBgitsubmodules\fR(7)
1217 Mounting one repository inside another\&.
1220 \fBgittutorial\fR(7)
1222 A tutorial introduction to Git\&.
1225 \fBgittutorial-2\fR(7)
1227 A tutorial introduction to Git: part two\&.
1230 \fBgitworkflows\fR(7)
1232 An overview of recommended workflows with Git\&.
1234 .SH "REPOSITORY, COMMAND AND FILE INTERFACES"
1236 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\&.
1238 \fBgitattributes\fR(5)
1240 Defining attributes per path\&.
1245 Git command\-line interface and conventions\&.
1250 Hooks used by Git\&.
1255 Specifies intentionally untracked files to ignore\&.
1260 Map author/committer names and/or E\-Mail addresses\&.
1265 Defining submodule properties\&.
1268 \fBgitrepository-layout\fR(5)
1270 Git Repository Layout\&.
1273 \fBgitrevisions\fR(7)
1275 Specifying revisions and ranges for Git\&.
1277 .SH "FILE FORMATS, PROTOCOLS AND OTHER DEVELOPER INTERFACES"
1279 This documentation discusses file formats, over\-the\-wire protocols and other git developer interfaces\&. See \fB\-\-developer\-interfaces\fR in \fBgit-help\fR(1)\&.
1281 \fBgitformat-bundle\fR(5)
1283 The bundle file format\&.
1286 \fBgitformat-chunk\fR(5)
1288 Chunk\-based file formats\&.
1291 \fBgitformat-commit-graph\fR(5)
1293 Git commit\-graph format\&.
1296 \fBgitformat-index\fR(5)
1301 \fBgitformat-pack\fR(5)
1306 \fBgitformat-signature\fR(5)
1308 Git cryptographic signature formats\&.
1311 \fBgitprotocol-capabilities\fR(5)
1313 Protocol v0 and v1 capabilities\&.
1316 \fBgitprotocol-common\fR(5)
1318 Things common to various protocols\&.
1321 \fBgitprotocol-http\fR(5)
1323 Git HTTP\-based protocols\&.
1326 \fBgitprotocol-pack\fR(5)
1328 How packs are transferred over\-the\-wire\&.
1331 \fBgitprotocol-v2\fR(5)
1333 Git Wire Protocol, Version 2\&.
1335 .SH "CONFIGURATION MECHANISM"
1337 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:
1344 # A \*(Aq#\*(Aq or \*(Aq;\*(Aq character indicates a comment\&.
1349 ; Don\*(Aqt trust file modes
1354 name = "Junio C Hamano"
1355 email = "gitster@pobox\&.com"
1361 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\&.
1362 .SH "IDENTIFIER TERMINOLOGY"
1366 Indicates the object name for any type of object\&.
1371 Indicates a blob object name\&.
1376 Indicates a tree object name\&.
1381 Indicates a commit object name\&.
1386 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>\&.
1391 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>\&.
1396 Indicates that an object type is required\&. Currently one of:
1405 Indicates a filename \- almost always relative to the root of the tree structure
1406 \fBGIT_INDEX_FILE\fR
1409 .SH "SYMBOLIC IDENTIFIERS"
1411 Any Git command accepting any <object> can also use the following symbolic notation:
1415 indicates the head of the current branch\&.
1423 \fBrefs/tags/<tag>\fR
1432 \fBrefs/heads/<head>\fR
1436 For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in \fBgitrevisions\fR(7)\&.
1437 .SH "FILE/DIRECTORY STRUCTURE"
1439 Please see the \fBgitrepository-layout\fR(5) document\&.
1441 Read \fBgithooks\fR(5) for more details about each hook\&.
1443 Higher level SCMs may provide and manage additional information in the \fB$GIT_DIR\fR\&.
1446 Please see \fBgitglossary\fR(7)\&.
1447 .SH "ENVIRONMENT VARIABLES"
1449 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"\&.
1451 Here are the variables:
1452 .SS "The Git Repository"
1454 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\&.
1456 \fBGIT_INDEX_FILE\fR
1458 This environment variable specifies an alternate index file\&. If not specified, the default of
1459 \fB$GIT_DIR/index\fR
1463 \fBGIT_INDEX_VERSION\fR
1465 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
1466 \fBgit-update-index\fR(1)
1467 for more information\&.
1470 \fBGIT_OBJECT_DIRECTORY\fR
1472 If the object storage directory is specified via this environment variable then the sha1 directories are created underneath \- otherwise the default
1473 \fB$GIT_DIR/objects\fR
1474 directory is used\&.
1477 \fBGIT_ALTERNATE_OBJECT_DIRECTORIES\fR
1479 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\&.
1481 Entries that begin with
1483 (double\-quote) will be interpreted as C\-style quoted paths, removing leading and trailing double\-quotes and respecting backslash escapes\&. E\&.g\&., the value
1484 \fB"path\-with\-\e"\-and\-:\-in\-it":vanilla\-path\fR
1486 \fBpath\-with\-"\-and\-:\-in\-it\fR
1488 \fBvanilla\-path\fR\&.
1495 environment variable is set then it specifies a path to use instead of the default
1497 for the base of the repository\&. The
1499 command\-line option also sets this value\&.
1504 Set the path to the root of the working tree\&. This can also be controlled by the
1505 \fB\-\-work\-tree\fR
1506 command\-line option and the core\&.worktree configuration variable\&.
1511 Set the Git namespace; see
1512 \fBgitnamespaces\fR(7)
1515 command\-line option also sets this value\&.
1518 \fBGIT_CEILING_DIRECTORIES\fR
1520 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\&.,
1521 \fBGIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink\fR\&.
1524 \fBGIT_DISCOVERY_ACROSS_FILESYSTEM\fR
1526 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
1527 \fBGIT_CEILING_DIRECTORIES\fR, this will not affect an explicit repository directory set via
1529 or on the command line\&.
1532 \fBGIT_COMMON_DIR\fR
1534 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
1535 \fBgitrepository-layout\fR(5)
1537 \fBgit-worktree\fR(1)
1538 for details\&. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY\&...\:
1541 \fBGIT_DEFAULT_HASH\fR
1543 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
1544 \fB\-\-object\-format\fR
1546 \fBgit-init\fR(1)\&.
1549 \fBGIT_DEFAULT_REF_FORMAT\fR
1551 If this variable is set, the default reference backend format for new repositories will be set to this value\&. The default is "files"\&. See
1552 \fB\-\-ref\-format\fR
1554 \fBgit-init\fR(1)\&.
1558 \fBGIT_AUTHOR_NAME\fR
1560 The human\-readable name used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1564 configuration settings\&.
1567 \fBGIT_AUTHOR_EMAIL\fR
1569 The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1572 \fBauthor\&.email\fR
1573 configuration settings\&.
1576 \fBGIT_AUTHOR_DATE\fR
1578 The date used for the author identity when creating commit or tag objects, or when writing reflogs\&. See
1580 for valid formats\&.
1583 \fBGIT_COMMITTER_NAME\fR
1585 The human\-readable name used in the committer identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1588 \fBcommitter\&.name\fR
1589 configuration settings\&.
1592 \fBGIT_COMMITTER_EMAIL\fR
1594 The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
1597 \fBcommitter\&.email\fR
1598 configuration settings\&.
1601 \fBGIT_COMMITTER_DATE\fR
1603 The date used for the committer identity when creating commit or tag objects, or when writing reflogs\&. See
1605 for valid formats\&.
1610 The email address used in the author and committer identities if no other relevant environment variable or configuration setting has been set\&.
1616 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\&.
1619 \fBGIT_EXTERNAL_DIFF\fR
1621 When the environment variable
1622 \fBGIT_EXTERNAL_DIFF\fR
1623 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,
1624 \fBGIT_EXTERNAL_DIFF\fR
1625 is called with 7 parameters:
1631 path old\-file old\-hex old\-mode new\-file new\-hex new\-mode
1642 are files GIT_EXTERNAL_DIFF can use to read the contents of <old|new>,
1647 are the 40\-hexdigit SHA\-1 hashes,
1652 are the octal representation of the file modes\&.
1654 The file parameters can point at the user\(cqs working file (e\&.g\&.
1656 in "git\-diff\-files"),
1660 when a new file is added), or a temporary file (e\&.g\&.
1663 \fBGIT_EXTERNAL_DIFF\fR
1664 should not worry about unlinking the temporary file \(em it is removed when
1665 \fBGIT_EXTERNAL_DIFF\fR
1668 For a path that is unmerged,
1669 \fBGIT_EXTERNAL_DIFF\fR
1670 is called with 1 parameter, <path>\&.
1673 \fBGIT_EXTERNAL_DIFF\fR
1674 is called, two environment variables,
1675 \fBGIT_DIFF_PATH_COUNTER\fR
1677 \fBGIT_DIFF_PATH_TOTAL\fR
1681 \fBGIT_EXTERNAL_DIFF_TRUST_EXIT_CODE\fR
1683 If this Boolean environment variable is set to true then the
1684 \fBGIT_EXTERNAL_DIFF\fR
1685 command is expected to return exit code 0 if it considers the input files to be equal or 1 if it considers them to be different, like
1686 \fBdiff(1)\fR\&. If it is set to false, which is the default, then the command is expected to return exit code 0 regardless of equality\&. Any other exit code causes Git to report a fatal error\&.
1689 \fBGIT_DIFF_PATH_COUNTER\fR
1691 A 1\-based counter incremented by one for every path\&.
1694 \fBGIT_DIFF_PATH_TOTAL\fR
1696 The total number of paths\&.
1700 \fBGIT_MERGE_VERBOSITY\fR
1702 A number controlling the amount of output shown by the recursive merge strategy\&. Overrides merge\&.verbosity\&. See
1708 This environment variable overrides
1709 \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
1712 \fBgit-config\fR(1)\&.
1715 \fBGIT_PROGRESS_DELAY\fR
1717 A number controlling how many seconds to delay before showing optional progress indicators\&. Defaults to 2\&.
1722 This environment variable overrides
1725 \fB$VISUAL\fR\&. It is used by several Git commands when, on interactive mode, an editor is to be launched\&. See also
1730 \fBgit-config\fR(1)\&.
1733 \fBGIT_SEQUENCE_EDITOR\fR
1735 This environment variable overrides the configured Git editor when editing the todo list of an interactive rebase\&. See also
1738 \fBsequence\&.editor\fR
1740 \fBgit-config\fR(1)\&.
1743 \fBGIT_SSH\fR, \fBGIT_SSH_COMMAND\fR
1745 If either of these environment variables is set then
1749 will use the specified command instead of
1751 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
1757 \fB$GIT_SSH_COMMAND\fR
1758 takes precedence over
1759 \fB$GIT_SSH\fR, and is interpreted by the shell, which allows additional arguments to be included\&.
1761 on the other hand must be just the path to a program (which can be a wrapper shell script, if additional arguments are needed)\&.
1763 Usually it is easier to configure any desired options through your personal
1765 file\&. Please consult your ssh documentation for further details\&.
1768 \fBGIT_SSH_VARIANT\fR
1770 If this environment variable is set, it overrides Git\(cqs autodetection whether
1771 \fBGIT_SSH\fR/\fBGIT_SSH_COMMAND\fR/\fBcore\&.sshCommand\fR
1772 refer to OpenSSH, plink or tortoiseplink\&. This variable overrides the config setting
1774 that serves the same purpose\&.
1777 \fBGIT_SSL_NO_VERIFY\fR
1779 Setting and exporting this environment variable to any value tells Git not to verify the SSL certificate when fetching or pushing over HTTPS\&.
1782 \fBGIT_ATTR_SOURCE\fR
1784 Sets the treeish that gitattributes will be read from\&.
1789 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
1790 \fBcore\&.askPass\fR
1792 \fBgit-config\fR(1)\&.
1795 \fBGIT_TERMINAL_PROMPT\fR
1797 If this Boolean environment variable is set to false, git will not prompt on the terminal (e\&.g\&., when asking for HTTP authentication)\&.
1800 \fBGIT_CONFIG_GLOBAL\fR, \fBGIT_CONFIG_SYSTEM\fR
1802 Take the configuration from the given files instead from global or system\-level configuration files\&. If
1803 \fBGIT_CONFIG_SYSTEM\fR
1804 is set, the system config file defined at build time (usually
1805 \fB/etc/gitconfig\fR) will not be read\&. Likewise, if
1806 \fBGIT_CONFIG_GLOBAL\fR
1808 \fB$HOME/\&.gitconfig\fR
1810 \fB$XDG_CONFIG_HOME/git/config\fR
1811 will be read\&. Can be set to
1813 to skip reading configuration files of the respective level\&.
1816 \fBGIT_CONFIG_NOSYSTEM\fR
1818 Whether to skip reading settings from the system\-wide
1819 \fB$(prefix)/etc/gitconfig\fR
1820 file\&. This Boolean environment variable can be used along with
1823 \fB$XDG_CONFIG_HOME\fR
1824 to create a predictable environment for a picky script, or you can set it to true to temporarily avoid using a buggy
1825 \fB/etc/gitconfig\fR
1826 file while waiting for someone with sufficient permissions to fix it\&.
1831 If this Boolean environment variable is set to true, then commands such as
1833 (in incremental mode),
1834 \fIgit rev\-list\fR,
1836 \fIgit check\-attr\fR
1838 \fIgit check\-ignore\fR
1839 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\&.
1844 Enables general trace messages, e\&.g\&. alias expansion, built\-in command execution and external command execution\&.
1846 If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
1848 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\&.
1850 Alternatively, if the variable is set to an absolute path (starting with a
1852 character), Git will interpret this as a file path and will try to append the trace messages to it\&.
1854 Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
1857 \fBGIT_TRACE_FSMONITOR\fR
1859 Enables trace messages for the filesystem monitor extension\&. See
1861 for available trace output options\&.
1864 \fBGIT_TRACE_PACK_ACCESS\fR
1866 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
1868 for available trace output options\&.
1871 \fBGIT_TRACE_PACKET\fR
1873 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
1874 \fBGIT_TRACE_PACKFILE\fR
1877 for available trace output options\&.
1880 \fBGIT_TRACE_PACKFILE\fR
1882 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\&.,
1883 \fBGIT_TRACE_PACKFILE=/tmp/my\&.pack\fR) rather than displaying it on the terminal or mixing it with other trace output\&.
1885 Note that this is currently only implemented for the client side of clones and fetches\&.
1888 \fBGIT_TRACE_PERFORMANCE\fR
1890 Enables performance related trace messages, e\&.g\&. total execution time of each Git command\&. See
1892 for available trace output options\&.
1895 \fBGIT_TRACE_REFS\fR
1897 Enables trace messages for operations on the ref database\&. See
1899 for available trace output options\&.
1902 \fBGIT_TRACE_SETUP\fR
1904 Enables trace messages printing the \&.git, working tree and current working directory after Git has completed its setup phase\&. See
1906 for available trace output options\&.
1909 \fBGIT_TRACE_SHALLOW\fR
1911 Enables trace messages that can help debugging fetching / cloning of shallow repositories\&. See
1913 for available trace output options\&.
1916 \fBGIT_TRACE_CURL\fR
1918 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
1919 \fB\-\-trace\-ascii\fR
1920 on the command line\&. See
1922 for available trace output options\&.
1925 \fBGIT_TRACE_CURL_NO_DATA\fR
1927 When a curl trace is enabled (see
1928 \fBGIT_TRACE_CURL\fR
1929 above), do not dump data (that is, only dump info lines and headers)\&.
1934 Enables more detailed trace messages from the "trace2" library\&. Output from
1936 is a simple text\-based format for human readability\&.
1938 If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
1940 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\&.
1942 Alternatively, if the variable is set to an absolute path (starting with a
1944 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)\&.
1946 In addition, if the variable is set to
1947 \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
1952 Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
1955 \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
1959 \fBGIT_TRACE2_EVENT\fR
1961 This setting writes a JSON\-based format that is suited for machine interpretation\&. See
1963 for available trace output options and
1964 \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
1968 \fBGIT_TRACE2_PERF\fR
1970 In addition to the text\-based messages available in
1971 \fBGIT_TRACE2\fR, this setting writes a column\-based format for understanding nesting regions\&. See
1973 for available trace output options and
1974 \m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
1978 \fBGIT_TRACE_REDACT\fR
1980 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\&.
1983 \fBGIT_NO_REPLACE_OBJECTS\fR
1985 Setting and exporting this environment variable tells Git to ignore replacement refs and do not replace Git objects\&.
1988 \fBGIT_LITERAL_PATHSPECS\fR
1990 Setting this Boolean environment variable to true will cause Git to treat all pathspecs literally, rather than as glob patterns\&. For example, running
1991 \fBGIT_LITERAL_PATHSPECS=1 git log \-\- \*(Aq*\&.c\*(Aq\fR
1992 will search for commits that touch the path
1993 \fB*\&.c\fR, not any paths that the glob
1995 matches\&. You might want this if you are feeding literal paths to Git (e\&.g\&., paths previously given to you by
1998 diff output, etc)\&.
2001 \fBGIT_GLOB_PATHSPECS\fR
2003 Setting this Boolean environment variable to true will cause Git to treat all pathspecs as glob patterns (aka "glob" magic)\&.
2006 \fBGIT_NOGLOB_PATHSPECS\fR
2008 Setting this Boolean environment variable to true will cause Git to treat all pathspecs as literal (aka "literal" magic)\&.
2011 \fBGIT_ICASE_PATHSPECS\fR
2013 Setting this Boolean environment variable to true will cause Git to treat all pathspecs as case\-insensitive\&.
2016 \fBGIT_NO_LAZY_FETCH\fR
2018 Setting this Boolean environment variable to true tells Git not to lazily fetch missing objects from the promisor remote on demand\&.
2021 \fBGIT_REFLOG_ACTION\fR
2023 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
2024 \fBgit\-sh\-setup\fR
2025 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\&.
2028 \fBGIT_REF_PARANOIA\fR
2030 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\&.,
2031 \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
2033 (i\&.e\&., be paranoid about detecting and aborting all operations)\&. You should not normally need to set this to
2034 \fB0\fR, but it may be useful when trying to salvage data from a corrupted repository\&.
2037 \fBGIT_COMMIT_GRAPH_PARANOIA\fR
2039 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\&.
2041 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\&.
2044 \fBGIT_ALLOW_PROTOCOL\fR
2046 If set to a colon\-separated list of protocols, behave as if
2047 \fBprotocol\&.allow\fR
2049 \fBnever\fR, and each of the listed protocols has
2050 \fBprotocol\&.<name>\&.allow\fR
2053 (overriding any existing configuration)\&. See the description of
2054 \fBprotocol\&.allow\fR
2060 \fBGIT_PROTOCOL_FROM_USER\fR
2062 Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are configured to the
2064 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
2071 For internal use only\&. Used in handshaking the wire protocol\&. Contains a colon
2073 separated list of keys with optional values
2074 \fI<key>[=<value>]\fR\&. Presence of unknown keys and values must be ignored\&.
2076 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\&.,
2078 or a filesystem path), as well as over the
2080 protocol\&. For git\-over\-http, it should work automatically in most configurations, but see the discussion in
2081 \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
2082 \fBAcceptEnv GIT_PROTOCOL\fR
2085 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)\&.
2088 \fBGIT_OPTIONAL_LOCKS\fR
2090 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
2092 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
2096 \fBGIT_REDIRECT_STDIN\fR, \fBGIT_REDIRECT_STDOUT\fR, \fBGIT_REDIRECT_STDERR\fR
2098 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
2099 \fBCreateProcess()\fR
2100 is not an option because it would require the handles to be marked inheritable (and consequently
2102 spawned process would inherit them, possibly blocking regular Git operations)\&. The primary intended use case is to use named pipes for communication (e\&.g\&.
2103 \fB\e\e\&.\epipe\emy\-git\-stdin\-123\fR)\&.
2105 Two special values are supported:
2107 will simply close the corresponding standard handle, and if
2108 \fBGIT_REDIRECT_STDERR\fR
2110 \fB2>&1\fR, standard error will be redirected to the same handle as standard output\&.
2113 \fBGIT_PRINT_SHA1_ELLIPSIS\fR (deprecated)
2116 \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)\&.
2122 \fB0\fR, then disable all advice messages\&. These messages are intended to provide hints to human users that may help them get out of problematic situations or take advantage of new features\&. Users can disable individual messages using the
2124 config keys\&. These messages may be disruptive to tools that execute Git processes, so this variable is available to disable the messages\&. (The
2125 \fB\-\-no\-advice\fR
2126 global option is also available, but old Git versions may fail when this option is not understood\&. The environment variable will be ignored by Git versions that do not understand it\&.)
2130 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)\&.
2132 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\&.
2134 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\&.
2136 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\&.
2138 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\&.
2140 When first created, objects are stored in individual files, but for efficiency may later be compressed together into "pack files"\&.
2142 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\&.
2144 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\&.
2146 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\&.
2149 Some configuration options and hook files may cause Git to run arbitrary shell commands\&. Because configuration and hooks are not copied using \fBgit clone\fR, it is generally safe to clone remote repositories with untrusted content, inspect them with \fBgit log\fR, and so on\&.
2151 However, it is not safe to run Git commands in a \fB\&.git\fR directory (or the working tree that surrounds it) when that \fB\&.git\fR directory itself comes from an untrusted source\&. The commands in its config and hooks are executed in the usual way\&.
2153 By default, Git will refuse to run when the repository is owned by someone other than the user running the command\&. See the entry for \fBsafe\&.directory\fR in \fBgit-config\fR(1)\&. While this can help protect you in a multi\-user environment, note that you can also acquire untrusted repositories that are owned by you (for example, if you extract a zip file or tarball from an untrusted source)\&. In such cases, you\(cqd need to "sanitize" the untrusted repository first\&.
2155 If you have an untrusted \fB\&.git\fR directory, you should first clone it with \fBgit clone \-\-no\-local\fR to obtain a clean copy\&. Git does restrict the set of options and hooks that will be run by \fBupload\-pack\fR, which handles the server side of a clone or fetch, but beware that the surface area for attack against \fBupload\-pack\fR is large, so this does carry some risk\&. The safest thing is to serve the repository as an unprivileged user (either via \fBgit-daemon\fR(1), ssh, or using other tools to change user ids)\&. See the discussion in the \fBSECURITY\fR section of \fBgit-upload-pack\fR(1)\&.
2156 .SH "FURTHER DOCUMENTATION"
2158 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\&.
2160 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\&.
2162 See \fBgitworkflows\fR(7) for an overview of recommended workflows\&.
2164 See also the \m[blue]\fBhowto\fR\m[]\&\s-2\u[4]\d\s+2 documents for some useful examples\&.
2166 The internals are documented in the \m[blue]\fBGit API documentation\fR\m[]\&\s-2\u[5]\d\s+2\&.
2168 Users migrating from CVS may also want to read \fBgitcvs-migration\fR(7)\&.
2171 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\&.
2173 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\&.
2174 .SH "REPORTING BUGS"
2176 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\&.
2178 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>\&.
2181 \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)
2184 Part of the \fBgit\fR(1) suite
2187 Git User\(cqs Manual
2189 \%git-htmldocs/user-manual.html
2192 Trace2 documentation
2194 \%git-htmldocs/technical/api-trace2.html
2197 Git concepts chapter of the user-manual
2199 \%git-htmldocs/user-manual.html#git-concepts
2204 \%git-htmldocs/howto-index.html
2207 Git API documentation
2209 \%git-htmldocs/technical/api-index.html
2214 \%mailto:git@vger.kernel.org
2217 git-security@googlegroups.com
2219 \%mailto:git-security@googlegroups.com