blob: d25361ded80e56ab8aae9d7faffecef70c500ced [file] [log] [blame]
'\" t
.\" Title: git
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 10/30/2018
.\" Manual: Git Manual
.\" Source: Git 2.19.1.708.g4ede3d42df
.\" Language: English
.\"
.TH "GIT" "1" "10/30/2018" "Git 2\&.19\&.1\&.708\&.g4ede3d" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git \- the stupid content tracker
.SH "SYNOPSIS"
.sp
.nf
\fIgit\fR [\-\-version] [\-\-help] [\-C <path>] [\-c <name>=<value>]
[\-\-exec\-path[=<path>]] [\-\-html\-path] [\-\-man\-path] [\-\-info\-path]
[\-p|\-\-paginate|\-P|\-\-no\-pager] [\-\-no\-replace\-objects] [\-\-bare]
[\-\-git\-dir=<path>] [\-\-work\-tree=<path>] [\-\-namespace=<name>]
[\-\-super\-prefix=<path>]
<command> [<args>]
.fi
.sp
.SH "DESCRIPTION"
.sp
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\&.
.sp
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\&.
.sp
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\&.
.sp
A formatted and hyperlinked copy of the latest Git documentation can be viewed at \fBhttps://git\&.github\&.io/htmldocs/git\&.html\fR\&.
.SH "OPTIONS"
.PP
\-\-version
.RS 4
Prints the Git suite version that the
\fIgit\fR
program came from\&.
.RE
.PP
\-\-help
.RS 4
Prints the synopsis and a list of the most commonly used commands\&. If the option
\fB\-\-all\fR
or
\fB\-a\fR
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\&.
.sp
Other options are available to control how the manual page is displayed\&. See
\fBgit-help\fR(1)
for more information, because
\fBgit \-\-help \&.\&.\&.\fR
is converted internally into
\fBgit help \&.\&.\&.\fR\&.
.RE
.PP
\-C <path>
.RS 4
Run as if git was started in
\fI<path>\fR
instead of the current working directory\&. When multiple
\fB\-C\fR
options are given, each subsequent non\-absolute
\fB\-C <path>\fR
is interpreted relative to the preceding
\fB\-C <path>\fR\&.
.sp
This option affects options that expect path name like
\fB\-\-git\-dir\fR
and
\fB\-\-work\-tree\fR
in that their interpretations of the path names would be made relative to the working directory caused by the
\fB\-C\fR
option\&. For example the following invocations are equivalent:
.sp
.if n \{\
.RS 4
.\}
.nf
git \-\-git\-dir=a\&.git \-\-work\-tree=b \-C c status
git \-\-git\-dir=c/a\&.git \-\-work\-tree=c/b status
.fi
.if n \{\
.RE
.\}
.RE
.PP
\-c <name>=<value>
.RS 4
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
\fIgit config\fR
(subkeys separated by dots)\&.
.sp
Note that omitting the
\fB=\fR
in
\fBgit \-c foo\&.bar \&.\&.\&.\fR
is allowed and sets
\fBfoo\&.bar\fR
to the boolean true value (just like
\fB[foo]bar\fR
would in a config file)\&. Including the equals but with an empty value (like
\fBgit \-c foo\&.bar= \&.\&.\&.\fR) sets
\fBfoo\&.bar\fR
to the empty string which
\fBgit config \-\-type=bool\fR
will convert to
\fBfalse\fR\&.
.RE
.PP
\-\-exec\-path[=<path>]
.RS 4
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,
\fIgit\fR
will print the current setting and then exit\&.
.RE
.PP
\-\-html\-path
.RS 4
Print the path, without trailing slash, where Git\(cqs HTML documentation is installed and exit\&.
.RE
.PP
\-\-man\-path
.RS 4
Print the manpath (see
\fBman(1)\fR) for the man pages for this version of Git and exit\&.
.RE
.PP
\-\-info\-path
.RS 4
Print the path where the Info files documenting this version of Git are installed and exit\&.
.RE
.PP
\-p, \-\-paginate
.RS 4
Pipe all output into
\fIless\fR
(or if set, $PAGER) if standard output is a terminal\&. This overrides the
\fBpager\&.<cmd>\fR
configuration options (see the "Configuration Mechanism" section below)\&.
.RE
.PP
\-P, \-\-no\-pager
.RS 4
Do not pipe Git output into a pager\&.
.RE
.PP
\-\-git\-dir=<path>
.RS 4
Set the path to the repository\&. This can also be controlled by setting the
\fBGIT_DIR\fR
environment variable\&. It can be an absolute path or relative path to current working directory\&.
.RE
.PP
\-\-work\-tree=<path>
.RS 4
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
\fBgit-config\fR(1)
for a more detailed discussion)\&.
.RE
.PP
\-\-namespace=<path>
.RS 4
Set the Git namespace\&. See
\fBgitnamespaces\fR(7)
for more details\&. Equivalent to setting the
\fBGIT_NAMESPACE\fR
environment variable\&.
.RE
.PP
\-\-super\-prefix=<path>
.RS 4
Currently for internal use only\&. Set a prefix which gives a path from above a repository down to its root\&. One use is to give submodules context about the superproject that invoked it\&.
.RE
.PP
\-\-bare
.RS 4
Treat the repository as a bare repository\&. If GIT_DIR environment is not set, it is set to the current working directory\&.
.RE
.PP
\-\-no\-replace\-objects
.RS 4
Do not use replacement refs to replace Git objects\&. See
\fBgit-replace\fR(1)
for more information\&.
.RE
.PP
\-\-literal\-pathspecs
.RS 4
Treat pathspecs literally (i\&.e\&. no globbing, no pathspec magic)\&. This is equivalent to setting the
\fBGIT_LITERAL_PATHSPECS\fR
environment variable to
\fB1\fR\&.
.RE
.PP
\-\-glob\-pathspecs
.RS 4
Add "glob" magic to all pathspec\&. This is equivalent to setting the
\fBGIT_GLOB_PATHSPECS\fR
environment variable to
\fB1\fR\&. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)"
.RE
.PP
\-\-noglob\-pathspecs
.RS 4
Add "literal" magic to all pathspec\&. This is equivalent to setting the
\fBGIT_NOGLOB_PATHSPECS\fR
environment variable to
\fB1\fR\&. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)"
.RE
.PP
\-\-icase\-pathspecs
.RS 4
Add "icase" magic to all pathspec\&. This is equivalent to setting the
\fBGIT_ICASE_PATHSPECS\fR
environment variable to
\fB1\fR\&.
.RE
.PP
\-\-no\-optional\-locks
.RS 4
Do not perform optional operations that require locks\&. This is equivalent to setting the
\fBGIT_OPTIONAL_LOCKS\fR
to
\fB0\fR\&.
.RE
.PP
\-\-list\-cmds=group[,group\&...]
.RS 4
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
\fB$PATH\fR
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)
.RE
.SH "GIT COMMANDS"
.sp
We divide Git into high level ("porcelain") commands and low level ("plumbing") commands\&.
.SH "HIGH\-LEVEL COMMANDS (PORCELAIN)"
.sp
We separate the porcelain commands into the main commands and some ancillary user utilities\&.
.SS "Main porcelain commands"
.PP
\fBgit-add\fR(1)
.RS 4
Add file contents to the index\&.
.RE
.PP
\fBgit-am\fR(1)
.RS 4
Apply a series of patches from a mailbox\&.
.RE
.PP
\fBgit-archive\fR(1)
.RS 4
Create an archive of files from a named tree\&.
.RE
.PP
\fBgit-bisect\fR(1)
.RS 4
Use binary search to find the commit that introduced a bug\&.
.RE
.PP
\fBgit-branch\fR(1)
.RS 4
List, create, or delete branches\&.
.RE
.PP
\fBgit-bundle\fR(1)
.RS 4
Move objects and refs by archive\&.
.RE
.PP
\fBgit-checkout\fR(1)
.RS 4
Switch branches or restore working tree files\&.
.RE
.PP
\fBgit-cherry-pick\fR(1)
.RS 4
Apply the changes introduced by some existing commits\&.
.RE
.PP
\fBgit-citool\fR(1)
.RS 4
Graphical alternative to git\-commit\&.
.RE
.PP
\fBgit-clean\fR(1)
.RS 4
Remove untracked files from the working tree\&.
.RE
.PP
\fBgit-clone\fR(1)
.RS 4
Clone a repository into a new directory\&.
.RE
.PP
\fBgit-commit\fR(1)
.RS 4
Record changes to the repository\&.
.RE
.PP
\fBgit-describe\fR(1)
.RS 4
Give an object a human readable name based on an available ref\&.
.RE
.PP
\fBgit-diff\fR(1)
.RS 4
Show changes between commits, commit and working tree, etc\&.
.RE
.PP
\fBgit-fetch\fR(1)
.RS 4
Download objects and refs from another repository\&.
.RE
.PP
\fBgit-format-patch\fR(1)
.RS 4
Prepare patches for e\-mail submission\&.
.RE
.PP
\fBgit-gc\fR(1)
.RS 4
Cleanup unnecessary files and optimize the local repository\&.
.RE
.PP
\fBgit-grep\fR(1)
.RS 4
Print lines matching a pattern\&.
.RE
.PP
\fBgit-gui\fR(1)
.RS 4
A portable graphical interface to Git\&.
.RE
.PP
\fBgit-init\fR(1)
.RS 4
Create an empty Git repository or reinitialize an existing one\&.
.RE
.PP
\fBgit-log\fR(1)
.RS 4
Show commit logs\&.
.RE
.PP
\fBgit-merge\fR(1)
.RS 4
Join two or more development histories together\&.
.RE
.PP
\fBgit-mv\fR(1)
.RS 4
Move or rename a file, a directory, or a symlink\&.
.RE
.PP
\fBgit-notes\fR(1)
.RS 4
Add or inspect object notes\&.
.RE
.PP
\fBgit-pull\fR(1)
.RS 4
Fetch from and integrate with another repository or a local branch\&.
.RE
.PP
\fBgit-push\fR(1)
.RS 4
Update remote refs along with associated objects\&.
.RE
.PP
\fBgit-range-diff\fR(1)
.RS 4
Compare two commit ranges (e\&.g\&. two versions of a branch)\&.
.RE
.PP
\fBgit-rebase\fR(1)
.RS 4
Reapply commits on top of another base tip\&.
.RE
.PP
\fBgit-reset\fR(1)
.RS 4
Reset current HEAD to the specified state\&.
.RE
.PP
\fBgit-revert\fR(1)
.RS 4
Revert some existing commits\&.
.RE
.PP
\fBgit-rm\fR(1)
.RS 4
Remove files from the working tree and from the index\&.
.RE
.PP
\fBgit-shortlog\fR(1)
.RS 4
Summarize
\fIgit log\fR
output\&.
.RE
.PP
\fBgit-show\fR(1)
.RS 4
Show various types of objects\&.
.RE
.PP
\fBgit-stash\fR(1)
.RS 4
Stash the changes in a dirty working directory away\&.
.RE
.PP
\fBgit-status\fR(1)
.RS 4
Show the working tree status\&.
.RE
.PP
\fBgit-submodule\fR(1)
.RS 4
Initialize, update or inspect submodules\&.
.RE
.PP
\fBgit-tag\fR(1)
.RS 4
Create, list, delete or verify a tag object signed with GPG\&.
.RE
.PP
\fBgit-worktree\fR(1)
.RS 4
Manage multiple working trees\&.
.RE
.PP
\fBgitk\fR(1)
.RS 4
The Git repository browser\&.
.RE
.SS "Ancillary Commands"
.sp
Manipulators:
.PP
\fBgit-config\fR(1)
.RS 4
Get and set repository or global options\&.
.RE
.PP
\fBgit-fast-export\fR(1)
.RS 4
Git data exporter\&.
.RE
.PP
\fBgit-fast-import\fR(1)
.RS 4
Backend for fast Git data importers\&.
.RE
.PP
\fBgit-filter-branch\fR(1)
.RS 4
Rewrite branches\&.
.RE
.PP
\fBgit-mergetool\fR(1)
.RS 4
Run merge conflict resolution tools to resolve merge conflicts\&.
.RE
.PP
\fBgit-pack-refs\fR(1)
.RS 4
Pack heads and tags for efficient repository access\&.
.RE
.PP
\fBgit-prune\fR(1)
.RS 4
Prune all unreachable objects from the object database\&.
.RE
.PP
\fBgit-reflog\fR(1)
.RS 4
Manage reflog information\&.
.RE
.PP
\fBgit-remote\fR(1)
.RS 4
Manage set of tracked repositories\&.
.RE
.PP
\fBgit-repack\fR(1)
.RS 4
Pack unpacked objects in a repository\&.
.RE
.PP
\fBgit-replace\fR(1)
.RS 4
Create, list, delete refs to replace objects\&.
.RE
.sp
Interrogators:
.PP
\fBgit-annotate\fR(1)
.RS 4
Annotate file lines with commit information\&.
.RE
.PP
\fBgit-blame\fR(1)
.RS 4
Show what revision and author last modified each line of a file\&.
.RE
.PP
\fBgit-count-objects\fR(1)
.RS 4
Count unpacked number of objects and their disk consumption\&.
.RE
.PP
\fBgit-difftool\fR(1)
.RS 4
Show changes using common diff tools\&.
.RE
.PP
\fBgit-fsck\fR(1)
.RS 4
Verifies the connectivity and validity of the objects in the database\&.
.RE
.PP
\fBgit-help\fR(1)
.RS 4
Display help information about Git\&.
.RE
.PP
\fBgit-instaweb\fR(1)
.RS 4
Instantly browse your working repository in gitweb\&.
.RE
.PP
\fBgit-merge-tree\fR(1)
.RS 4
Show three\-way merge without touching index\&.
.RE
.PP
\fBgit-rerere\fR(1)
.RS 4
Reuse recorded resolution of conflicted merges\&.
.RE
.PP
\fBgit-show-branch\fR(1)
.RS 4
Show branches and their commits\&.
.RE
.PP
\fBgit-verify-commit\fR(1)
.RS 4
Check the GPG signature of commits\&.
.RE
.PP
\fBgit-verify-tag\fR(1)
.RS 4
Check the GPG signature of tags\&.
.RE
.PP
\fBgit-whatchanged\fR(1)
.RS 4
Show logs with difference each commit introduces\&.
.RE
.PP
\fBgitweb\fR(1)
.RS 4
Git web interface (web frontend to Git repositories)\&.
.RE
.SS "Interacting with Others"
.sp
These commands are to interact with foreign SCM and with other people via patch over e\-mail\&.
.PP
\fBgit-archimport\fR(1)
.RS 4
Import a GNU Arch repository into Git\&.
.RE
.PP
\fBgit-cvsexportcommit\fR(1)
.RS 4
Export a single commit to a CVS checkout\&.
.RE
.PP
\fBgit-cvsimport\fR(1)
.RS 4
Salvage your data out of another SCM people love to hate\&.
.RE
.PP
\fBgit-cvsserver\fR(1)
.RS 4
A CVS server emulator for Git\&.
.RE
.PP
\fBgit-imap-send\fR(1)
.RS 4
Send a collection of patches from stdin to an IMAP folder\&.
.RE
.PP
\fBgit-p4\fR(1)
.RS 4
Import from and submit to Perforce repositories\&.
.RE
.PP
\fBgit-quiltimport\fR(1)
.RS 4
Applies a quilt patchset onto the current branch\&.
.RE
.PP
\fBgit-request-pull\fR(1)
.RS 4
Generates a summary of pending changes\&.
.RE
.PP
\fBgit-send-email\fR(1)
.RS 4
Send a collection of patches as emails\&.
.RE
.PP
\fBgit-svn\fR(1)
.RS 4
Bidirectional operation between a Subversion repository and Git\&.
.RE
.SH "LOW\-LEVEL COMMANDS (PLUMBING)"
.sp
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)\&.
.sp
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\&.
.sp
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\&.
.SS "Manipulation commands"
.PP
\fBgit-apply\fR(1)
.RS 4
Apply a patch to files and/or to the index\&.
.RE
.PP
\fBgit-checkout-index\fR(1)
.RS 4
Copy files from the index to the working tree\&.
.RE
.PP
\fBgit-commit-graph\fR(1)
.RS 4
Write and verify Git commit\-graph files\&.
.RE
.PP
\fBgit-commit-tree\fR(1)
.RS 4
Create a new commit object\&.
.RE
.PP
\fBgit-hash-object\fR(1)
.RS 4
Compute object ID and optionally creates a blob from a file\&.
.RE
.PP
\fBgit-index-pack\fR(1)
.RS 4
Build pack index file for an existing packed archive\&.
.RE
.PP
\fBgit-merge-file\fR(1)
.RS 4
Run a three\-way file merge\&.
.RE
.PP
\fBgit-merge-index\fR(1)
.RS 4
Run a merge for files needing merging\&.
.RE
.PP
\fBgit-mktag\fR(1)
.RS 4
Creates a tag object\&.
.RE
.PP
\fBgit-mktree\fR(1)
.RS 4
Build a tree\-object from ls\-tree formatted text\&.
.RE
.PP
\fBgit-multi-pack-index\fR(1)
.RS 4
Write and verify multi\-pack\-indexes\&.
.RE
.PP
\fBgit-pack-objects\fR(1)
.RS 4
Create a packed archive of objects\&.
.RE
.PP
\fBgit-prune-packed\fR(1)
.RS 4
Remove extra objects that are already in pack files\&.
.RE
.PP
\fBgit-read-tree\fR(1)
.RS 4
Reads tree information into the index\&.
.RE
.PP
\fBgit-symbolic-ref\fR(1)
.RS 4
Read, modify and delete symbolic refs\&.
.RE
.PP
\fBgit-unpack-objects\fR(1)
.RS 4
Unpack objects from a packed archive\&.
.RE
.PP
\fBgit-update-index\fR(1)
.RS 4
Register file contents in the working tree to the index\&.
.RE
.PP
\fBgit-update-ref\fR(1)
.RS 4
Update the object name stored in a ref safely\&.
.RE
.PP
\fBgit-write-tree\fR(1)
.RS 4
Create a tree object from the current index\&.
.RE
.SS "Interrogation commands"
.PP
\fBgit-cat-file\fR(1)
.RS 4
Provide content or type and size information for repository objects\&.
.RE
.PP
\fBgit-cherry\fR(1)
.RS 4
Find commits yet to be applied to upstream\&.
.RE
.PP
\fBgit-diff-files\fR(1)
.RS 4
Compares files in the working tree and the index\&.
.RE
.PP
\fBgit-diff-index\fR(1)
.RS 4
Compare a tree to the working tree or index\&.
.RE
.PP
\fBgit-diff-tree\fR(1)
.RS 4
Compares the content and mode of blobs found via two tree objects\&.
.RE
.PP
\fBgit-for-each-ref\fR(1)
.RS 4
Output information on each ref\&.
.RE
.PP
\fBgit-get-tar-commit-id\fR(1)
.RS 4
Extract commit ID from an archive created using git\-archive\&.
.RE
.PP
\fBgit-ls-files\fR(1)
.RS 4
Show information about files in the index and the working tree\&.
.RE
.PP
\fBgit-ls-remote\fR(1)
.RS 4
List references in a remote repository\&.
.RE
.PP
\fBgit-ls-tree\fR(1)
.RS 4
List the contents of a tree object\&.
.RE
.PP
\fBgit-merge-base\fR(1)
.RS 4
Find as good common ancestors as possible for a merge\&.
.RE
.PP
\fBgit-name-rev\fR(1)
.RS 4
Find symbolic names for given revs\&.
.RE
.PP
\fBgit-pack-redundant\fR(1)
.RS 4
Find redundant pack files\&.
.RE
.PP
\fBgit-rev-list\fR(1)
.RS 4
Lists commit objects in reverse chronological order\&.
.RE
.PP
\fBgit-rev-parse\fR(1)
.RS 4
Pick out and massage parameters\&.
.RE
.PP
\fBgit-show-index\fR(1)
.RS 4
Show packed archive index\&.
.RE
.PP
\fBgit-show-ref\fR(1)
.RS 4
List references in a local repository\&.
.RE
.PP
\fBgit-unpack-file\fR(1)
.RS 4
Creates a temporary file with a blob\(cqs contents\&.
.RE
.PP
\fBgit-var\fR(1)
.RS 4
Show a Git logical variable\&.
.RE
.PP
\fBgit-verify-pack\fR(1)
.RS 4
Validate packed Git archive files\&.
.RE
.sp
In general, the interrogate commands do not touch the files in the working tree\&.
.SS "Synching repositories"
.PP
\fBgit-daemon\fR(1)
.RS 4
A really simple server for Git repositories\&.
.RE
.PP
\fBgit-fetch-pack\fR(1)
.RS 4
Receive missing objects from another repository\&.
.RE
.PP
\fBgit-http-backend\fR(1)
.RS 4
Server side implementation of Git over HTTP\&.
.RE
.PP
\fBgit-send-pack\fR(1)
.RS 4
Push objects over Git protocol to another repository\&.
.RE
.PP
\fBgit-update-server-info\fR(1)
.RS 4
Update auxiliary info file to help dumb servers\&.
.RE
.sp
The following are helper commands used by the above; end users typically do not use them directly\&.
.PP
\fBgit-http-fetch\fR(1)
.RS 4
Download from a remote Git repository via HTTP\&.
.RE
.PP
\fBgit-http-push\fR(1)
.RS 4
Push objects over HTTP/DAV to another repository\&.
.RE
.PP
\fBgit-parse-remote\fR(1)
.RS 4
Routines to help parsing remote repository access parameters\&.
.RE
.PP
\fBgit-receive-pack\fR(1)
.RS 4
Receive what is pushed into the repository\&.
.RE
.PP
\fBgit-shell\fR(1)
.RS 4
Restricted login shell for Git\-only SSH access\&.
.RE
.PP
\fBgit-upload-archive\fR(1)
.RS 4
Send archive back to git\-archive\&.
.RE
.PP
\fBgit-upload-pack\fR(1)
.RS 4
Send objects packed back to git\-fetch\-pack\&.
.RE
.SS "Internal helper commands"
.sp
These are internal helper commands used by other commands; end users typically do not use them directly\&.
.PP
\fBgit-check-attr\fR(1)
.RS 4
Display gitattributes information\&.
.RE
.PP
\fBgit-check-ignore\fR(1)
.RS 4
Debug gitignore / exclude files\&.
.RE
.PP
\fBgit-check-mailmap\fR(1)
.RS 4
Show canonical names and email addresses of contacts\&.
.RE
.PP
\fBgit-check-ref-format\fR(1)
.RS 4
Ensures that a reference name is well formed\&.
.RE
.PP
\fBgit-column\fR(1)
.RS 4
Display data in columns\&.
.RE
.PP
\fBgit-credential\fR(1)
.RS 4
Retrieve and store user credentials\&.
.RE
.PP
\fBgit-credential-cache\fR(1)
.RS 4
Helper to temporarily store passwords in memory\&.
.RE
.PP
\fBgit-credential-store\fR(1)
.RS 4
Helper to store credentials on disk\&.
.RE
.PP
\fBgit-fmt-merge-msg\fR(1)
.RS 4
Produce a merge commit message\&.
.RE
.PP
\fBgit-interpret-trailers\fR(1)
.RS 4
add or parse structured information in commit messages\&.
.RE
.PP
\fBgit-mailinfo\fR(1)
.RS 4
Extracts patch and authorship from a single e\-mail message\&.
.RE
.PP
\fBgit-mailsplit\fR(1)
.RS 4
Simple UNIX mbox splitter program\&.
.RE
.PP
\fBgit-merge-one-file\fR(1)
.RS 4
The standard helper program to use with git\-merge\-index\&.
.RE
.PP
\fBgit-patch-id\fR(1)
.RS 4
Compute unique ID for a patch\&.
.RE
.PP
\fBgit-sh-i18n\fR(1)
.RS 4
Git\(cqs i18n setup code for shell scripts\&.
.RE
.PP
\fBgit-sh-setup\fR(1)
.RS 4
Common Git shell script setup code\&.
.RE
.PP
\fBgit-stripspace\fR(1)
.RS 4
Remove unnecessary whitespace\&.
.RE
.SH "CONFIGURATION MECHANISM"
.sp
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:
.sp
.if n \{\
.RS 4
.\}
.nf
#
# A \(aq#\(aq or \(aq;\(aq character indicates a comment\&.
#
; core variables
[core]
; Don\(aqt trust file modes
filemode = false
; user identity
[user]
name = "Junio C Hamano"
email = "gitster@pobox\&.com"
.fi
.if n \{\
.RE
.\}
.sp
.sp
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\&.
.SH "IDENTIFIER TERMINOLOGY"
.PP
<object>
.RS 4
Indicates the object name for any type of object\&.
.RE
.PP
<blob>
.RS 4
Indicates a blob object name\&.
.RE
.PP
<tree>
.RS 4
Indicates a tree object name\&.
.RE
.PP
<commit>
.RS 4
Indicates a commit object name\&.
.RE
.PP
<tree\-ish>
.RS 4
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>\&.
.RE
.PP
<commit\-ish>
.RS 4
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>\&.
.RE
.PP
<type>
.RS 4
Indicates that an object type is required\&. Currently one of:
\fBblob\fR,
\fBtree\fR,
\fBcommit\fR, or
\fBtag\fR\&.
.RE
.PP
<file>
.RS 4
Indicates a filename \- almost always relative to the root of the tree structure
\fBGIT_INDEX_FILE\fR
describes\&.
.RE
.SH "SYMBOLIC IDENTIFIERS"
.sp
Any Git command accepting any <object> can also use the following symbolic notation:
.PP
HEAD
.RS 4
indicates the head of the current branch\&.
.RE
.PP
<tag>
.RS 4
a valid tag
\fIname\fR
(i\&.e\&. a
\fBrefs/tags/<tag>\fR
reference)\&.
.RE
.PP
<head>
.RS 4
a valid head
\fIname\fR
(i\&.e\&. a
\fBrefs/heads/<head>\fR
reference)\&.
.RE
.sp
For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in \fBgitrevisions\fR(7)\&.
.SH "FILE/DIRECTORY STRUCTURE"
.sp
Please see the \fBgitrepository-layout\fR(5) document\&.
.sp
Read \fBgithooks\fR(5) for more details about each hook\&.
.sp
Higher level SCMs may provide and manage additional information in the \fB$GIT_DIR\fR\&.
.SH "TERMINOLOGY"
.sp
Please see \fBgitglossary\fR(7)\&.
.SH "ENVIRONMENT VARIABLES"
.sp
Various Git commands use the following environment variables:
.SS "The Git Repository"
.sp
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\&.
.PP
\fBGIT_INDEX_FILE\fR
.RS 4
This environment allows the specification of an alternate index file\&. If not specified, the default of
\fB$GIT_DIR/index\fR
is used\&.
.RE
.PP
\fBGIT_INDEX_VERSION\fR
.RS 4
This environment variable allows the specification of an index version for new repositories\&. It won\(cqt affect existing index files\&. By default index file version 2 or 3 is used\&. See
\fBgit-update-index\fR(1)
for more information\&.
.RE
.PP
\fBGIT_OBJECT_DIRECTORY\fR
.RS 4
If the object storage directory is specified via this environment variable then the sha1 directories are created underneath \- otherwise the default
\fB$GIT_DIR/objects\fR
directory is used\&.
.RE
.PP
\fBGIT_ALTERNATE_OBJECT_DIRECTORIES\fR
.RS 4
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\&.
.sp
Entries that begin with
\fB"\fR
(double\-quote) will be interpreted as C\-style quoted paths, removing leading and trailing double\-quotes and respecting backslash escapes\&. E\&.g\&., the value
\fB"path\-with\-\e"\-and\-:\-in\-it":vanilla\-path\fR
has two paths:
\fBpath\-with\-"\-and\-:\-in\-it\fR
and
\fBvanilla\-path\fR\&.
.RE
.PP
\fBGIT_DIR\fR
.RS 4
If the
\fBGIT_DIR\fR
environment variable is set then it specifies a path to use instead of the default
\fB\&.git\fR
for the base of the repository\&. The
\fB\-\-git\-dir\fR
command\-line option also sets this value\&.
.RE
.PP
\fBGIT_WORK_TREE\fR
.RS 4
Set the path to the root of the working tree\&. This can also be controlled by the
\fB\-\-work\-tree\fR
command\-line option and the core\&.worktree configuration variable\&.
.RE
.PP
\fBGIT_NAMESPACE\fR
.RS 4
Set the Git namespace; see
\fBgitnamespaces\fR(7)
for details\&. The
\fB\-\-namespace\fR
command\-line option also sets this value\&.
.RE
.PP
\fBGIT_CEILING_DIRECTORIES\fR
.RS 4
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\&.,
\fBGIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink\fR\&.
.RE
.PP
\fBGIT_DISCOVERY_ACROSS_FILESYSTEM\fR
.RS 4
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 environment variable can be set to true to tell Git not to stop at filesystem boundaries\&. Like
\fBGIT_CEILING_DIRECTORIES\fR, this will not affect an explicit repository directory set via
\fBGIT_DIR\fR
or on the command line\&.
.RE
.PP
\fBGIT_COMMON_DIR\fR
.RS 4
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
\fBgitrepository-layout\fR(5)
and
\fBgit-worktree\fR(1)
for details\&. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY\&...
.RE
.SS "Git Commits"
.PP
\fBGIT_AUTHOR_NAME\fR, \fBGIT_AUTHOR_EMAIL\fR, \fBGIT_AUTHOR_DATE\fR, \fBGIT_COMMITTER_NAME\fR, \fBGIT_COMMITTER_EMAIL\fR, \fBGIT_COMMITTER_DATE\fR, \fIEMAIL\fR
.RS 4
see
\fBgit-commit-tree\fR(1)
.RE
.SS "Git Diffs"
.PP
\fBGIT_DIFF_OPTS\fR
.RS 4
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\&.
.RE
.PP
\fBGIT_EXTERNAL_DIFF\fR
.RS 4
When the environment variable
\fBGIT_EXTERNAL_DIFF\fR
is set, the program named by it is called, instead of the diff invocation described above\&. For a path that is added, removed, or modified,
\fBGIT_EXTERNAL_DIFF\fR
is called with 7 parameters:
.sp
.if n \{\
.RS 4
.\}
.nf
path old\-file old\-hex old\-mode new\-file new\-hex new\-mode
.fi
.if n \{\
.RE
.\}
.sp
where:
.RE
.PP
<old|new>\-file
.RS 4
are files GIT_EXTERNAL_DIFF can use to read the contents of <old|new>,
.RE
.PP
<old|new>\-hex
.RS 4
are the 40\-hexdigit SHA\-1 hashes,
.RE
.PP
<old|new>\-mode
.RS 4
are the octal representation of the file modes\&.
.sp
The file parameters can point at the user\(cqs working file (e\&.g\&.
\fBnew\-file\fR
in "git\-diff\-files"),
\fB/dev/null\fR
(e\&.g\&.
\fBold\-file\fR
when a new file is added), or a temporary file (e\&.g\&.
\fBold\-file\fR
in the index)\&.
\fBGIT_EXTERNAL_DIFF\fR
should not worry about unlinking the temporary file \-\-\- it is removed when
\fBGIT_EXTERNAL_DIFF\fR
exits\&.
.sp
For a path that is unmerged,
\fBGIT_EXTERNAL_DIFF\fR
is called with 1 parameter, <path>\&.
.sp
For each path
\fBGIT_EXTERNAL_DIFF\fR
is called, two environment variables,
\fBGIT_DIFF_PATH_COUNTER\fR
and
\fBGIT_DIFF_PATH_TOTAL\fR
are set\&.
.RE
.PP
\fBGIT_DIFF_PATH_COUNTER\fR
.RS 4
A 1\-based counter incremented by one for every path\&.
.RE
.PP
\fBGIT_DIFF_PATH_TOTAL\fR
.RS 4
The total number of paths\&.
.RE
.SS "other"
.PP
\fBGIT_MERGE_VERBOSITY\fR
.RS 4
A number controlling the amount of output shown by the recursive merge strategy\&. Overrides merge\&.verbosity\&. See
\fBgit-merge\fR(1)
.RE
.PP
\fBGIT_PAGER\fR
.RS 4
This environment variable overrides
\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
\fBcore\&.pager\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_EDITOR\fR
.RS 4
This environment variable overrides
\fB$EDITOR\fR
and
\fB$VISUAL\fR\&. It is used by several Git commands when, on interactive mode, an editor is to be launched\&. See also
\fBgit-var\fR(1)
and the
\fBcore\&.editor\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_SSH\fR, \fBGIT_SSH_COMMAND\fR
.RS 4
If either of these environment variables is set then
\fIgit fetch\fR
and
\fIgit push\fR
will use the specified command instead of
\fIssh\fR
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
\fBssh\&.variant\fR
option in
\fBgit-config\fR(1)
for details\&.
.RE
.sp
+ \fB$GIT_SSH_COMMAND\fR takes precedence over \fB$GIT_SSH\fR, and is interpreted by the shell, which allows additional arguments to be included\&. \fB$GIT_SSH\fR on the other hand must be just the path to a program (which can be a wrapper shell script, if additional arguments are needed)\&.
.sp
+ Usually it is easier to configure any desired options through your personal \fB\&.ssh/config\fR file\&. Please consult your ssh documentation for further details\&.
.PP
\fBGIT_SSH_VARIANT\fR
.RS 4
If this environment variable is set, it overrides Git\(cqs autodetection whether
\fBGIT_SSH\fR/\fBGIT_SSH_COMMAND\fR/\fBcore\&.sshCommand\fR
refer to OpenSSH, plink or tortoiseplink\&. This variable overrides the config setting
\fBssh\&.variant\fR
that serves the same purpose\&.
.RE
.PP
\fBGIT_ASKPASS\fR
.RS 4
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
\fBcore\&.askPass\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_TERMINAL_PROMPT\fR
.RS 4
If this environment variable is set to
\fB0\fR, git will not prompt on the terminal (e\&.g\&., when asking for HTTP authentication)\&.
.RE
.PP
\fBGIT_CONFIG_NOSYSTEM\fR
.RS 4
Whether to skip reading settings from the system\-wide
\fB$(prefix)/etc/gitconfig\fR
file\&. This environment variable can be used along with
\fB$HOME\fR
and
\fB$XDG_CONFIG_HOME\fR
to create a predictable environment for a picky script, or you can set it temporarily to avoid using a buggy
\fB/etc/gitconfig\fR
file while waiting for someone with sufficient permissions to fix it\&.
.RE
.PP
\fBGIT_FLUSH\fR
.RS 4
If this environment variable is set to "1", then commands such as
\fIgit blame\fR
(in incremental mode),
\fIgit rev\-list\fR,
\fIgit log\fR,
\fIgit check\-attr\fR
and
\fIgit check\-ignore\fR
will force a flush of the output stream after each record have been flushed\&. If this variable is set to "0", 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\&.
.RE
.PP
\fBGIT_TRACE\fR
.RS 4
Enables general trace messages, e\&.g\&. alias expansion, built\-in command execution and external command execution\&.
.sp
If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
.sp
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\&.
.sp
Alternatively, if the variable is set to an absolute path (starting with a
\fI/\fR
character), Git will interpret this as a file path and will try to append the trace messages to it\&.
.sp
Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
.RE
.PP
\fBGIT_TRACE_FSMONITOR\fR
.RS 4
Enables trace messages for the filesystem monitor extension\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_PACK_ACCESS\fR
.RS 4
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
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_PACKET\fR
.RS 4
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
\fBGIT_TRACE_PACKFILE\fR
below)\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_PACKFILE\fR
.RS 4
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\&.,
\fBGIT_TRACE_PACKFILE=/tmp/my\&.pack\fR) rather than displaying it on the terminal or mixing it with other trace output\&.
.sp
Note that this is currently only implemented for the client side of clones and fetches\&.
.RE
.PP
\fBGIT_TRACE_PERFORMANCE\fR
.RS 4
Enables performance related trace messages, e\&.g\&. total execution time of each Git command\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_SETUP\fR
.RS 4
Enables trace messages printing the \&.git, working tree and current working directory after Git has completed its setup phase\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_SHALLOW\fR
.RS 4
Enables trace messages that can help debugging fetching / cloning of shallow repositories\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_CURL\fR
.RS 4
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
\fB\-\-trace\-ascii\fR
on the command line\&. This option overrides setting the
\fBGIT_CURL_VERBOSE\fR
environment variable\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_CURL_NO_DATA\fR
.RS 4
When a curl trace is enabled (see
\fBGIT_TRACE_CURL\fR
above), do not dump data (that is, only dump info lines and headers)\&.
.RE
.PP
\fBGIT_REDACT_COOKIES\fR
.RS 4
This can be set to a comma\-separated list of strings\&. When a curl trace is enabled (see
\fBGIT_TRACE_CURL\fR
above), whenever a "Cookies:" header sent by the client is dumped, values of cookies whose key is in that list (case\-sensitive) are redacted\&.
.RE
.PP
\fBGIT_LITERAL_PATHSPECS\fR
.RS 4
Setting this variable to
\fB1\fR
will cause Git to treat all pathspecs literally, rather than as glob patterns\&. For example, running
\fBGIT_LITERAL_PATHSPECS=1 git log \-\- \(aq*\&.c\(aq\fR
will search for commits that touch the path
\fB*\&.c\fR, not any paths that the glob
\fB*\&.c\fR
matches\&. You might want this if you are feeding literal paths to Git (e\&.g\&., paths previously given to you by
\fBgit ls\-tree\fR,
\fB\-\-raw\fR
diff output, etc)\&.
.RE
.PP
\fBGIT_GLOB_PATHSPECS\fR
.RS 4
Setting this variable to
\fB1\fR
will cause Git to treat all pathspecs as glob patterns (aka "glob" magic)\&.
.RE
.PP
\fBGIT_NOGLOB_PATHSPECS\fR
.RS 4
Setting this variable to
\fB1\fR
will cause Git to treat all pathspecs as literal (aka "literal" magic)\&.
.RE
.PP
\fBGIT_ICASE_PATHSPECS\fR
.RS 4
Setting this variable to
\fB1\fR
will cause Git to treat all pathspecs as case\-insensitive\&.
.RE
.PP
\fBGIT_REFLOG_ACTION\fR
.RS 4
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
\fBgit\-sh\-setup\fR
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\&.
.RE
.PP
\fBGIT_REF_PARANOIA\fR
.RS 4
If set to
\fB1\fR, include broken or badly named refs when iterating over lists of refs\&. In a normal, non\-corrupted repository, this does nothing\&. However, enabling it may help git to detect and abort some operations in the presence of broken refs\&. Git sets this variable automatically when performing destructive operations like
\fBgit-prune\fR(1)\&. You should not need to set it yourself unless you want to be paranoid about making sure an operation has touched every ref (e\&.g\&., because you are cloning a repository to make a backup)\&.
.RE
.PP
\fBGIT_ALLOW_PROTOCOL\fR
.RS 4
If set to a colon\-separated list of protocols, behave as if
\fBprotocol\&.allow\fR
is set to
\fBnever\fR, and each of the listed protocols has
\fBprotocol\&.<name>\&.allow\fR
set to
\fBalways\fR
(overriding any existing configuration)\&. In other words, any protocol not mentioned will be disallowed (i\&.e\&., this is a whitelist, not a blacklist)\&. See the description of
\fBprotocol\&.allow\fR
in
\fBgit-config\fR(1)
for more details\&.
.RE
.PP
\fBGIT_PROTOCOL_FROM_USER\fR
.RS 4
Set to 0 to prevent protocols used by fetch/push/clone which are configured to the
\fBuser\fR
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
\fBgit-config\fR(1)
for more details\&.
.RE
.PP
\fBGIT_PROTOCOL\fR
.RS 4
For internal use only\&. Used in handshaking the wire protocol\&. Contains a colon
\fI:\fR
separated list of keys with optional values
\fIkey[=value]\fR\&. Presence of unknown keys and values must be ignored\&.
.RE
.PP
\fBGIT_OPTIONAL_LOCKS\fR
.RS 4
If set to
\fB0\fR, Git will complete any requested operation without performing any optional sub\-operations that require taking a lock\&. For example, this will prevent
\fBgit status\fR
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
\fB1\fR\&.
.RE
.PP
\fBGIT_REDIRECT_STDIN\fR, \fBGIT_REDIRECT_STDOUT\fR, \fBGIT_REDIRECT_STDERR\fR
.RS 4
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
\fBCreateProcess()\fR
is not an option because it would require the handles to be marked inheritable (and consequently
\fBevery\fR
spawned process would inherit them, possibly blocking regular Git operations)\&. The primary intended use case is to use named pipes for communication (e\&.g\&.
\fB\e\e\&.\epipe\emy\-git\-stdin\-123\fR)\&.
.sp
Two special values are supported:
\fBoff\fR
will simply close the corresponding standard handle, and if
\fBGIT_REDIRECT_STDERR\fR
is
\fB2>&1\fR, standard error will be redirected to the same handle as standard output\&.
.RE
.PP
\fBGIT_PRINT_SHA1_ELLIPSIS\fR (deprecated)
.RS 4
If set to
\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)\&.
.RE
.SH "DISCUSSION"
.sp
More detail on the following is available from the \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[2]\d\s+2 and \fBgitcore-tutorial\fR(7)\&.
.sp
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\&.
.sp
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\&.
.sp
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\&.
.sp
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\&.
.sp
When first created, objects are stored in individual files, but for efficiency may later be compressed together into "pack files"\&.
.sp
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\&. Refs with names beginning \fBref/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 \fBref/tags/\fR\&. A special ref named \fBHEAD\fR contains the name of the currently checked\-out branch\&.
.sp
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\&.
.sp
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\&.
.SH "FURTHER DOCUMENTATION"
.sp
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\&.
.sp
The \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[2]\d\s+2 and \fBgitcore-tutorial\fR(7) both provide introductions to the underlying Git architecture\&.
.sp
See \fBgitworkflows\fR(7) for an overview of recommended workflows\&.
.sp
See also the \m[blue]\fBhowto\fR\m[]\&\s-2\u[3]\d\s+2 documents for some useful examples\&.
.sp
The internals are documented in the \m[blue]\fBGit API documentation\fR\m[]\&\s-2\u[4]\d\s+2\&.
.sp
Users migrating from CVS may also want to read \fBgitcvs-migration\fR(7)\&.
.SH "AUTHORS"
.sp
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[5]\d\s+2>\&. \m[blue]\fBhttp://www\&.openhub\&.net/p/git/contributors/summary\fR\m[] gives you a more complete list of contributors\&.
.sp
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\&.
.SH "REPORTING BUGS"
.sp
Report bugs to the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[5]\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://public\-inbox\&.org/git\fR\m[] for previous bug reports and other discussions\&.
.sp
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[6]\d\s+2>\&.
.SH "SEE ALSO"
.sp
\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)
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite
.SH "NOTES"
.IP " 1." 4
Git User\(cqs Manual
.RS 4
\%git-htmldocs/user-manual.html
.RE
.IP " 2." 4
Git concepts chapter of the user-manual
.RS 4
\%git-htmldocs/user-manual.html#git-concepts
.RE
.IP " 3." 4
howto
.RS 4
\%git-htmldocs/howto-index.html
.RE
.IP " 4." 4
Git API documentation
.RS 4
\%git-htmldocs/technical/api-index.html
.RE
.IP " 5." 4
git@vger.kernel.org
.RS 4
\%mailto:git@vger.kernel.org
.RE
.IP " 6." 4
git-security@googlegroups.com
.RS 4
\%mailto:git-security@googlegroups.com
.RE