1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
\r
4 <article lang="en" id="git(1)">
\r
6 <title>git(1)</title>
\r
8 <primary>git(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git - the stupid content tracker</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git</emphasis> [--version] [--exec-path[=GIT_EXEC_PATH]]
\r
19 [-p|--paginate|--no-pager]
\r
20 [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
\r
21 [--help] COMMAND [ARGS]</literallayout>
\r
24 <simplesect id="_description">
\r
25 <title>DESCRIPTION</title>
\r
26 <simpara>Git is a fast, scalable, distributed revision control system with an
\r
27 unusually rich command set that provides both high-level operations
\r
28 and full access to internals.</simpara>
\r
29 <simpara>See <xref linkend="gittutorial(7)"/> to get started, then see
\r
30 <ulink url="everyday.html">Everyday Git</ulink> for a useful minimum set of commands, and
\r
31 "man git-commandname" for documentation of each command. CVS users may
\r
32 also want to read <xref linkend="gitcvs-migration(7)"/>. See
\r
33 the <ulink url="user-manual.html">Git User’s Manual</ulink> for a more in-depth
\r
34 introduction.</simpara>
\r
35 <simpara>The COMMAND is either a name of a Git command (see below) or an alias
\r
36 as defined in the configuration file (see <xref linkend="git-config(1)"/>).</simpara>
\r
37 <simpara>Formatted and hyperlinked version of the latest git
\r
38 documentation can be viewed at
\r
39 <literal>http://www.kernel.org/pub/software/scm/git/docs/</literal>.</simpara>
\r
41 <simplesect id="_options">
\r
42 <title>OPTIONS</title>
\r
50 Prints the git suite version that the <emphasis>git</emphasis> program came from.
\r
60 Prints the synopsis and a list of the most commonly used
\r
61 commands. If the option <emphasis>--all</emphasis> or <emphasis>-a</emphasis> is given then all
\r
62 available commands are printed. If a git command is named this
\r
63 option will bring up the manual page for that command.
\r
65 <simpara>Other options are available to control how the manual page is
\r
66 displayed. See <xref linkend="git-help(1)"/> for more information,
\r
67 because <literal>git --help …</literal> is converted internally into <literal>git
\r
68 help …</literal>.</simpara>
\r
77 Path to wherever your core git programs are installed.
\r
78 This can also be controlled by setting the GIT_EXEC_PATH
\r
79 environment variable. If no path is given, <emphasis>git</emphasis> will print
\r
80 the current setting and then exit.
\r
93 Pipe all output into <emphasis>less</emphasis> (or if set, $PAGER).
\r
103 Do not pipe git output into a pager.
\r
109 --git-dir=<path>
\r
113 Set the path to the repository. This can also be controlled by
\r
114 setting the GIT_DIR environment variable. It can be an absolute
\r
115 path or relative path to current working directory.
\r
121 --work-tree=<path>
\r
125 Set the path to the working tree. The value will not be
\r
126 used in combination with repositories found automatically in
\r
127 a .git directory (i.e. $GIT_DIR is not set).
\r
128 This can also be controlled by setting the GIT_WORK_TREE
\r
129 environment variable and the core.worktree configuration
\r
130 variable. It can be an absolute path or relative path to
\r
131 the directory specified by --git-dir or GIT_DIR.
\r
132 Note: If --git-dir or GIT_DIR are specified but none of
\r
133 --work-tree, GIT_WORK_TREE and core.worktree is specified,
\r
134 the current working directory is regarded as the top directory
\r
135 of your working tree.
\r
145 Treat the repository as a bare repository. If GIT_DIR
\r
146 environment is not set, it is set to the current working
\r
153 <simplesect id="_further_documentation">
\r
154 <title>FURTHER DOCUMENTATION</title>
\r
155 <simpara>See the references above to get started using git. The following is
\r
156 probably more detail than necessary for a first-time user.</simpara>
\r
157 <simpara>The <ulink url="user-manual.html#git-concepts">git concepts chapter of the
\r
158 user-manual</ulink> and <xref linkend="gitcore-tutorial(7)"/> both provide
\r
159 introductions to the underlying git architecture.</simpara>
\r
160 <simpara>See also the <ulink url="howto-index.html">howto</ulink> documents for some useful
\r
161 examples.</simpara>
\r
162 <simpara>The internals are documented in the
\r
163 <ulink url="technical/api-index.html">GIT API documentation</ulink>.</simpara>
\r
165 <simplesect id="_git_commands">
\r
166 <title>GIT COMMANDS</title>
\r
167 <simpara>We divide git into high level ("porcelain") commands and low level
\r
168 ("plumbing") commands.</simpara>
\r
170 <simplesect id="_high_level_commands_porcelain">
\r
171 <title>High-level commands (porcelain)</title>
\r
172 <simpara>We separate the porcelain commands into the main commands and some
\r
173 ancillary user utilities.</simpara>
\r
174 <simplesect id="_main_porcelain_commands">
\r
175 <title>Main porcelain commands</title>
\r
179 <xref linkend="git-add(1)"/>
\r
183 Add file contents to the index.
\r
189 <xref linkend="git-am(1)"/>
\r
193 Apply a series of patches from a mailbox.
\r
199 <xref linkend="git-archive(1)"/>
\r
203 Create an archive of files from a named tree.
\r
209 <xref linkend="git-bisect(1)"/>
\r
213 Find the change that introduced a bug by binary search.
\r
219 <xref linkend="git-branch(1)"/>
\r
223 List, create, or delete branches.
\r
229 <xref linkend="git-bundle(1)"/>
\r
233 Move objects and refs by archive.
\r
239 <xref linkend="git-checkout(1)"/>
\r
243 Checkout a branch or paths to the working tree.
\r
249 <xref linkend="git-cherry-pick(1)"/>
\r
253 Apply the change introduced by an existing commit.
\r
259 <xref linkend="git-citool(1)"/>
\r
263 Graphical alternative to git-commit.
\r
269 <xref linkend="git-clean(1)"/>
\r
273 Remove untracked files from the working tree.
\r
279 <xref linkend="git-clone(1)"/>
\r
283 Clone a repository into a new directory.
\r
289 <xref linkend="git-commit(1)"/>
\r
293 Record changes to the repository.
\r
299 <xref linkend="git-describe(1)"/>
\r
303 Show the most recent tag that is reachable from a commit.
\r
309 <xref linkend="git-diff(1)"/>
\r
313 Show changes between commits, commit and working tree, etc.
\r
319 <xref linkend="git-fetch(1)"/>
\r
323 Download objects and refs from another repository.
\r
329 <xref linkend="git-format-patch(1)"/>
\r
333 Prepare patches for e-mail submission.
\r
339 <xref linkend="git-gc(1)"/>
\r
343 Cleanup unnecessary files and optimize the local repository.
\r
349 <xref linkend="git-grep(1)"/>
\r
353 Print lines matching a pattern.
\r
359 <xref linkend="git-gui(1)"/>
\r
363 A portable graphical interface to Git.
\r
369 <xref linkend="git-init(1)"/>
\r
373 Create an empty git repository or reinitialize an existing one.
\r
379 <xref linkend="git-log(1)"/>
\r
389 <xref linkend="git-merge(1)"/>
\r
393 Join two or more development histories together.
\r
399 <xref linkend="git-mv(1)"/>
\r
403 Move or rename a file, a directory, or a symlink.
\r
409 <xref linkend="git-notes(1)"/>
\r
413 Add/inspect commit notes.
\r
419 <xref linkend="git-pull(1)"/>
\r
423 Fetch from and merge with another repository or a local branch.
\r
429 <xref linkend="git-push(1)"/>
\r
433 Update remote refs along with associated objects.
\r
439 <xref linkend="git-rebase(1)"/>
\r
443 Forward-port local commits to the updated upstream head.
\r
449 <xref linkend="git-reset(1)"/>
\r
453 Reset current HEAD to the specified state.
\r
459 <xref linkend="git-revert(1)"/>
\r
463 Revert an existing commit.
\r
469 <xref linkend="git-rm(1)"/>
\r
473 Remove files from the working tree and from the index.
\r
479 <xref linkend="git-shortlog(1)"/>
\r
483 Summarize <emphasis>git-log</emphasis> output.
\r
489 <xref linkend="git-show(1)"/>
\r
493 Show various types of objects.
\r
499 <xref linkend="git-stash(1)"/>
\r
503 Stash the changes in a dirty working directory away.
\r
509 <xref linkend="git-status(1)"/>
\r
513 Show the working tree status.
\r
519 <xref linkend="git-submodule(1)"/>
\r
523 Initialize, update or inspect submodules.
\r
529 <xref linkend="git-tag(1)"/>
\r
533 Create, list, delete or verify a tag object signed with GPG.
\r
539 <xref linkend="gitk(1)"/>
\r
543 The git repository browser.
\r
549 <simplesect id="_ancillary_commands">
\r
550 <title>Ancillary Commands</title>
\r
551 <simpara>Manipulators:</simpara>
\r
555 <xref linkend="git-config(1)"/>
\r
559 Get and set repository or global options.
\r
565 <xref linkend="git-fast-export(1)"/>
\r
575 <xref linkend="git-fast-import(1)"/>
\r
579 Backend for fast Git data importers.
\r
585 <xref linkend="git-filter-branch(1)"/>
\r
595 <xref linkend="git-lost-found(1)"/>
\r
599 (deprecated) Recover lost refs that luckily have not yet been pruned.
\r
605 <xref linkend="git-mergetool(1)"/>
\r
609 Run merge conflict resolution tools to resolve merge conflicts.
\r
615 <xref linkend="git-pack-refs(1)"/>
\r
619 Pack heads and tags for efficient repository access.
\r
625 <xref linkend="git-prune(1)"/>
\r
629 Prune all unreachable objects from the object database.
\r
635 <xref linkend="git-reflog(1)"/>
\r
639 Manage reflog information.
\r
645 <xref linkend="git-relink(1)"/>
\r
649 Hardlink common objects in local repositories.
\r
655 <xref linkend="git-remote(1)"/>
\r
659 manage set of tracked repositories.
\r
665 <xref linkend="git-repack(1)"/>
\r
669 Pack unpacked objects in a repository.
\r
675 <xref linkend="git-repo-config(1)"/>
\r
679 (deprecated) Get and set repository or global options.
\r
684 <simpara>Interrogators:</simpara>
\r
688 <xref linkend="git-annotate(1)"/>
\r
692 Annotate file lines with commit info.
\r
698 <xref linkend="git-blame(1)"/>
\r
702 Show what revision and author last modified each line of a file.
\r
708 <xref linkend="git-cherry(1)"/>
\r
712 Find commits not merged upstream.
\r
718 <xref linkend="git-count-objects(1)"/>
\r
722 Count unpacked number of objects and their disk consumption.
\r
728 <xref linkend="git-fsck(1)"/>
\r
732 Verifies the connectivity and validity of the objects in the database.
\r
738 <xref linkend="git-get-tar-commit-id(1)"/>
\r
742 Extract commit ID from an archive created using git-archive.
\r
748 <xref linkend="git-help(1)"/>
\r
752 display help information about git.
\r
758 <xref linkend="git-instaweb(1)"/>
\r
762 Instantly browse your working repository in gitweb.
\r
768 <xref linkend="git-merge-tree(1)"/>
\r
772 Show three-way merge without touching index.
\r
778 <xref linkend="git-rerere(1)"/>
\r
782 Reuse recorded resolution of conflicted merges.
\r
788 <xref linkend="git-rev-parse(1)"/>
\r
792 Pick out and massage parameters.
\r
798 <xref linkend="git-show-branch(1)"/>
\r
802 Show branches and their commits.
\r
808 <xref linkend="git-verify-tag(1)"/>
\r
812 Check the GPG signature of tags.
\r
818 <xref linkend="git-whatchanged(1)"/>
\r
822 Show logs with difference each commit introduces.
\r
828 <simplesect id="_interacting_with_others">
\r
829 <title>Interacting with Others</title>
\r
830 <simpara>These commands are to interact with foreign SCM and with other
\r
831 people via patch over e-mail.</simpara>
\r
835 <xref linkend="git-archimport(1)"/>
\r
839 Import an Arch repository into git.
\r
845 <xref linkend="git-cvsexportcommit(1)"/>
\r
849 Export a single commit to a CVS checkout.
\r
855 <xref linkend="git-cvsimport(1)"/>
\r
859 Salvage your data out of another SCM people love to hate.
\r
865 <xref linkend="git-cvsserver(1)"/>
\r
869 A CVS server emulator for git.
\r
875 <xref linkend="git-imap-send(1)"/>
\r
879 Send a collection of patches from stdin to an IMAP folder.
\r
885 <xref linkend="git-quiltimport(1)"/>
\r
889 Applies a quilt patchset onto the current branch.
\r
895 <xref linkend="git-request-pull(1)"/>
\r
899 Generates a summary of pending changes.
\r
905 <xref linkend="git-send-email(1)"/>
\r
909 Send a collection of patches as emails.
\r
915 <xref linkend="git-svn(1)"/>
\r
919 Bidirectional operation between a single Subversion branch and git.
\r
926 <simplesect id="_low_level_commands_plumbing">
\r
927 <title>Low-level commands (plumbing)</title>
\r
928 <simpara>Although git includes its
\r
929 own porcelain layer, its low-level commands are sufficient to support
\r
930 development of alternative porcelains. Developers of such porcelains
\r
931 might start by reading about <xref linkend="git-update-index(1)"/> and
\r
932 <xref linkend="git-read-tree(1)"/>.</simpara>
\r
933 <simpara>The interface (input, output, set of options and the semantics)
\r
934 to these low-level commands are meant to be a lot more stable
\r
935 than Porcelain level commands, because these commands are
\r
936 primarily for scripted use. The interface to Porcelain commands
\r
937 on the other hand are subject to change in order to improve the
\r
938 end user experience.</simpara>
\r
939 <simpara>The following description divides
\r
940 the low-level commands into commands that manipulate objects (in
\r
941 the repository, index, and working tree), commands that interrogate and
\r
942 compare objects, and commands that move objects and references between
\r
943 repositories.</simpara>
\r
944 <simplesect id="_manipulation_commands">
\r
945 <title>Manipulation commands</title>
\r
949 <xref linkend="git-apply(1)"/>
\r
953 Apply a patch on a git index file and a working tree.
\r
959 <xref linkend="git-checkout-index(1)"/>
\r
963 Copy files from the index to the working tree.
\r
969 <xref linkend="git-commit-tree(1)"/>
\r
973 Create a new commit object.
\r
979 <xref linkend="git-hash-object(1)"/>
\r
983 Compute object ID and optionally creates a blob from a file.
\r
989 <xref linkend="git-index-pack(1)"/>
\r
993 Build pack index file for an existing packed archive.
\r
999 <xref linkend="git-merge-file(1)"/>
\r
1003 Run a three-way file merge.
\r
1009 <xref linkend="git-merge-index(1)"/>
\r
1013 Run a merge for files needing merging.
\r
1019 <xref linkend="git-mktag(1)"/>
\r
1023 Creates a tag object.
\r
1029 <xref linkend="git-mktree(1)"/>
\r
1033 Build a tree-object from ls-tree formatted text.
\r
1039 <xref linkend="git-pack-objects(1)"/>
\r
1043 Create a packed archive of objects.
\r
1049 <xref linkend="git-prune-packed(1)"/>
\r
1053 Remove extra objects that are already in pack files.
\r
1059 <xref linkend="git-read-tree(1)"/>
\r
1063 Reads tree information into the index.
\r
1069 <xref linkend="git-symbolic-ref(1)"/>
\r
1073 Read and modify symbolic refs.
\r
1079 <xref linkend="git-unpack-objects(1)"/>
\r
1083 Unpack objects from a packed archive.
\r
1089 <xref linkend="git-update-index(1)"/>
\r
1093 Register file contents in the working tree to the index.
\r
1099 <xref linkend="git-update-ref(1)"/>
\r
1103 Update the object name stored in a ref safely.
\r
1109 <xref linkend="git-write-tree(1)"/>
\r
1113 Create a tree object from the current index.
\r
1119 <simplesect id="_interrogation_commands">
\r
1120 <title>Interrogation commands</title>
\r
1124 <xref linkend="git-cat-file(1)"/>
\r
1128 Provide content or type/size information for repository objects.
\r
1134 <xref linkend="git-diff-files(1)"/>
\r
1138 Compares files in the working tree and the index.
\r
1144 <xref linkend="git-diff-index(1)"/>
\r
1148 Compares content and mode of blobs between the index and repository.
\r
1154 <xref linkend="git-diff-tree(1)"/>
\r
1158 Compares the content and mode of blobs found via two tree objects.
\r
1164 <xref linkend="git-for-each-ref(1)"/>
\r
1168 Output information on each ref.
\r
1174 <xref linkend="git-ls-files(1)"/>
\r
1178 Show information about files in the index and the working tree.
\r
1184 <xref linkend="git-ls-remote(1)"/>
\r
1188 List references in a remote repository.
\r
1194 <xref linkend="git-ls-tree(1)"/>
\r
1198 List the contents of a tree object.
\r
1204 <xref linkend="git-merge-base(1)"/>
\r
1208 Find as good common ancestors as possible for a merge.
\r
1214 <xref linkend="git-name-rev(1)"/>
\r
1218 Find symbolic names for given revs.
\r
1224 <xref linkend="git-pack-redundant(1)"/>
\r
1228 Find redundant pack files.
\r
1234 <xref linkend="git-rev-list(1)"/>
\r
1238 Lists commit objects in reverse chronological order.
\r
1244 <xref linkend="git-show-index(1)"/>
\r
1248 Show packed archive index.
\r
1254 <xref linkend="git-show-ref(1)"/>
\r
1258 List references in a local repository.
\r
1264 <xref linkend="git-tar-tree(1)"/>
\r
1268 (deprecated) Create a tar archive of the files in the named tree object.
\r
1274 <xref linkend="git-unpack-file(1)"/>
\r
1278 Creates a temporary file with a blob’s contents.
\r
1284 <xref linkend="git-var(1)"/>
\r
1288 Show a git logical variable.
\r
1294 <xref linkend="git-verify-pack(1)"/>
\r
1298 Validate packed git archive files.
\r
1303 <simpara>In general, the interrogate commands do not touch the files in
\r
1304 the working tree.</simpara>
\r
1306 <simplesect id="_synching_repositories">
\r
1307 <title>Synching repositories</title>
\r
1311 <xref linkend="git-daemon(1)"/>
\r
1315 A really simple server for git repositories.
\r
1321 <xref linkend="git-fetch-pack(1)"/>
\r
1325 Receive missing objects from another repository.
\r
1331 <xref linkend="git-send-pack(1)"/>
\r
1335 Push objects over git protocol to another repository.
\r
1341 <xref linkend="git-update-server-info(1)"/>
\r
1345 Update auxiliary info file to help dumb servers.
\r
1350 <simpara>The following are helper programs used by the above; end users
\r
1351 typically do not use them directly.</simpara>
\r
1355 <xref linkend="git-http-fetch(1)"/>
\r
1359 Download from a remote git repository via HTTP.
\r
1365 <xref linkend="git-http-push(1)"/>
\r
1369 Push objects over HTTP/DAV to another repository.
\r
1375 <xref linkend="git-parse-remote(1)"/>
\r
1379 Routines to help parsing remote repository access parameters.
\r
1385 <xref linkend="git-receive-pack(1)"/>
\r
1389 Receive what is pushed into the repository.
\r
1395 <xref linkend="git-shell(1)"/>
\r
1399 Restricted login shell for GIT-only SSH access.
\r
1405 <xref linkend="git-upload-archive(1)"/>
\r
1409 Send archive back to git-archive.
\r
1415 <xref linkend="git-upload-pack(1)"/>
\r
1419 Send objects packed back to git-fetch-pack.
\r
1425 <simplesect id="_internal_helper_commands">
\r
1426 <title>Internal helper commands</title>
\r
1427 <simpara>These are internal helper commands used by other commands; end
\r
1428 users typically do not use them directly.</simpara>
\r
1432 <xref linkend="git-check-attr(1)"/>
\r
1436 Display gitattributes information.
\r
1442 <xref linkend="git-check-ref-format(1)"/>
\r
1446 Make sure ref name is well formed.
\r
1452 <xref linkend="git-fmt-merge-msg(1)"/>
\r
1456 Produce a merge commit message.
\r
1462 <xref linkend="git-mailinfo(1)"/>
\r
1466 Extracts patch and authorship from a single e-mail message.
\r
1472 <xref linkend="git-mailsplit(1)"/>
\r
1476 Simple UNIX mbox splitter program.
\r
1482 <xref linkend="git-merge-one-file(1)"/>
\r
1486 The standard helper program to use with git-merge-index.
\r
1492 <xref linkend="git-patch-id(1)"/>
\r
1496 Compute unique ID for a patch.
\r
1502 <xref linkend="git-peek-remote(1)"/>
\r
1506 (deprecated) List the references in a remote repository.
\r
1512 <xref linkend="git-sh-setup(1)"/>
\r
1516 Common git shell script setup code.
\r
1522 <xref linkend="git-stripspace(1)"/>
\r
1526 Filter out empty lines.
\r
1533 <simplesect id="_configuration_mechanism">
\r
1534 <title>Configuration Mechanism</title>
\r
1535 <simpara>Starting from 0.99.9 (actually mid 0.99.8.GIT), <literal>.git/config</literal> file
\r
1536 is used to hold per-repository configuration options. It is a
\r
1537 simple text file modeled after <literal>.ini</literal> format familiar to some
\r
1538 people. Here is an example:</simpara>
\r
1540 # A '#' or ';' character indicates a comment.
\r
1545 ; Don't trust file modes
\r
1550 name = "Junio C Hamano"
\r
1551 email = "junkio@twinsun.com"</literallayout>
\r
1552 <simpara>Various commands read from the configuration file and adjust
\r
1553 their operation accordingly.</simpara>
\r
1555 <simplesect id="_identifier_terminology">
\r
1556 <title>Identifier Terminology</title>
\r
1564 Indicates the object name for any type of object.
\r
1574 Indicates a blob object name.
\r
1584 Indicates a tree object name.
\r
1594 Indicates a commit object name.
\r
1604 Indicates a tree, commit or tag object name. A
\r
1605 command that takes a <tree-ish> argument ultimately wants to
\r
1606 operate on a <tree> object but automatically dereferences
\r
1607 <commit> and <tag> objects that point at a <tree>.
\r
1613 <commit-ish>
\r
1617 Indicates a commit or tag object name. A
\r
1618 command that takes a <commit-ish> argument ultimately wants to
\r
1619 operate on a <commit> object but automatically dereferences
\r
1620 <tag> objects that point at a <commit>.
\r
1630 Indicates that an object type is required.
\r
1631 Currently one of: <literal>blob</literal>, <literal>tree</literal>, <literal>commit</literal>, or <literal>tag</literal>.
\r
1641 Indicates a filename - almost always relative to the
\r
1642 root of the tree structure <literal>GIT_INDEX_FILE</literal> describes.
\r
1648 <simplesect id="_symbolic_identifiers">
\r
1649 <title>Symbolic Identifiers</title>
\r
1650 <simpara>Any git command accepting any <object> can also use the following
\r
1651 symbolic notation:</simpara>
\r
1659 indicates the head of the current branch (i.e. the
\r
1660 contents of <literal>$GIT_DIR/HEAD</literal>).
\r
1670 a valid tag <emphasis>name</emphasis>
\r
1671 (i.e. the contents of <literal>$GIT_DIR/refs/tags/<tag></literal>).
\r
1681 a valid head <emphasis>name</emphasis>
\r
1682 (i.e. the contents of <literal>$GIT_DIR/refs/heads/<head></literal>).
\r
1687 <simpara>For a more complete list of ways to spell object names, see
\r
1688 "SPECIFYING REVISIONS" section in <xref linkend="git-rev-parse(1)"/>.</simpara>
\r
1690 <simplesect id="_file_directory_structure">
\r
1691 <title>File/Directory Structure</title>
\r
1692 <simpara>Please see the <xref linkend="gitrepository-layout(5)"/> document.</simpara>
\r
1693 <simpara>Read <xref linkend="githooks(5)"/> for more details about each hook.</simpara>
\r
1694 <simpara>Higher level SCMs may provide and manage additional information in the
\r
1695 <literal>$GIT_DIR</literal>.</simpara>
\r
1697 <simplesect id="_terminology">
\r
1698 <title>Terminology</title>
\r
1699 <simpara>Please see <xref linkend="gitglossary(7)"/>.</simpara>
\r
1701 <simplesect id="_environment_variables">
\r
1702 <title>Environment Variables</title>
\r
1703 <simpara>Various git commands use the following environment variables:</simpara>
\r
1704 <simplesect id="_the_git_repository">
\r
1705 <title>The git Repository</title>
\r
1706 <simpara>These environment variables apply to <emphasis>all</emphasis> core git commands. Nb: it
\r
1707 is worth noting that they may be used/overridden by SCMS sitting above
\r
1708 git so take care if using Cogito etc.</simpara>
\r
1712 <emphasis>GIT_INDEX_FILE</emphasis>
\r
1716 This environment allows the specification of an alternate
\r
1717 index file. If not specified, the default of <literal>$GIT_DIR/index</literal>
\r
1724 <emphasis>GIT_OBJECT_DIRECTORY</emphasis>
\r
1728 If the object storage directory is specified via this
\r
1729 environment variable then the sha1 directories are created
\r
1730 underneath - otherwise the default <literal>$GIT_DIR/objects</literal>
\r
1731 directory is used.
\r
1737 <emphasis>GIT_ALTERNATE_OBJECT_DIRECTORIES</emphasis>
\r
1741 Due to the immutable nature of git objects, old objects can be
\r
1742 archived into shared, read-only directories. This variable
\r
1743 specifies a ":" separated (on Windows ";" separated) list
\r
1744 of git object directories which can be used to search for git
\r
1745 objects. New objects will not be written to these directories.
\r
1751 <emphasis>GIT_DIR</emphasis>
\r
1755 If the <emphasis>GIT_DIR</emphasis> environment variable is set then it
\r
1756 specifies a path to use instead of the default <literal>.git</literal>
\r
1757 for the base of the repository.
\r
1763 <emphasis>GIT_WORK_TREE</emphasis>
\r
1767 Set the path to the working tree. The value will not be
\r
1768 used in combination with repositories found automatically in
\r
1769 a .git directory (i.e. $GIT_DIR is not set).
\r
1770 This can also be controlled by the <emphasis>--work-tree</emphasis> command line
\r
1771 option and the core.worktree configuration variable.
\r
1777 <emphasis>GIT_CEILING_DIRECTORIES</emphasis>
\r
1781 This should be a colon-separated list of absolute paths.
\r
1782 If set, it is a list of directories that git should not chdir
\r
1783 up into while looking for a repository directory.
\r
1784 It will not exclude the current working directory or
\r
1785 a GIT_DIR set on the command line or in the environment.
\r
1786 (Useful for excluding slow-loading network directories.)
\r
1792 <simplesect id="_git_commits">
\r
1793 <title>git Commits</title>
\r
1797 <emphasis>GIT_AUTHOR_NAME</emphasis>
\r
1800 <emphasis>GIT_AUTHOR_EMAIL</emphasis>
\r
1803 <emphasis>GIT_AUTHOR_DATE</emphasis>
\r
1806 <emphasis>GIT_COMMITTER_NAME</emphasis>
\r
1809 <emphasis>GIT_COMMITTER_EMAIL</emphasis>
\r
1812 <emphasis>GIT_COMMITTER_DATE</emphasis>
\r
1815 <emphasis>EMAIL</emphasis>
\r
1819 see <xref linkend="git-commit-tree(1)"/>
\r
1825 <simplesect id="_git_diffs">
\r
1826 <title>git Diffs</title>
\r
1830 <emphasis>GIT_DIFF_OPTS</emphasis>
\r
1834 Only valid setting is "--unified=??" or "-u??" to set the
\r
1835 number of context lines shown when a unified diff is created.
\r
1836 This takes precedence over any "-U" or "--unified" option
\r
1837 value passed on the git diff command line.
\r
1843 <emphasis>GIT_EXTERNAL_DIFF</emphasis>
\r
1847 When the environment variable <emphasis>GIT_EXTERNAL_DIFF</emphasis> is set, the
\r
1848 program named by it is called, instead of the diff invocation
\r
1849 described above. For a path that is added, removed, or modified,
\r
1850 <emphasis>GIT_EXTERNAL_DIFF</emphasis> is called with 7 parameters:
\r
1852 <literallayout class="monospaced">path old-file old-hex old-mode new-file new-hex new-mode</literallayout>
\r
1853 <simpara>where:</simpara>
\r
1858 <old|new>-file
\r
1862 are files GIT_EXTERNAL_DIFF can use to read the
\r
1863 contents of <old|new>,
\r
1869 <old|new>-hex
\r
1873 are the 40-hexdigit SHA1 hashes,
\r
1879 <old|new>-mode
\r
1883 are the octal representation of the file modes.
\r
1889 The file parameters can point at the user’s working file
\r
1890 (e.g. <literal>new-file</literal> in "git-diff-files"), <literal>/dev/null</literal> (e.g. <literal>old-file</literal>
\r
1891 when a new file is added), or a temporary file (e.g. <literal>old-file</literal> in the
\r
1892 index). <emphasis>GIT_EXTERNAL_DIFF</emphasis> should not worry about unlinking the
\r
1893 temporary file --- it is removed when <emphasis>GIT_EXTERNAL_DIFF</emphasis> exits.</simpara>
\r
1895 For a path that is unmerged, <emphasis>GIT_EXTERNAL_DIFF</emphasis> is called with 1
\r
1896 parameter, <path>.</simpara>
\r
1898 <simplesect id="_other">
\r
1899 <title>other</title>
\r
1903 <emphasis>GIT_MERGE_VERBOSITY</emphasis>
\r
1907 A number controlling the amount of output shown by
\r
1908 the recursive merge strategy. Overrides merge.verbosity.
\r
1909 See <xref linkend="git-merge(1)"/>
\r
1915 <emphasis>GIT_PAGER</emphasis>
\r
1919 This environment variable overrides <literal>$PAGER</literal>. If it is set
\r
1920 to an empty string or to the value "cat", git will not launch
\r
1921 a pager. See also the <literal>core.pager</literal> option in
\r
1922 <xref linkend="git-config(1)"/>.
\r
1928 <emphasis>GIT_SSH</emphasis>
\r
1932 If this environment variable is set then <emphasis>git-fetch</emphasis>
\r
1933 and <emphasis>git-push</emphasis> will use this command instead
\r
1934 of <emphasis>ssh</emphasis> when they need to connect to a remote system.
\r
1935 The <emphasis>$GIT_SSH</emphasis> command will be given exactly two arguments:
\r
1936 the <emphasis>username@host</emphasis> (or just <emphasis>host</emphasis>) from the URL and the
\r
1937 shell command to execute on that remote system.
\r
1939 <simpara>To pass options to the program that you want to list in GIT_SSH
\r
1940 you will need to wrap the program and options into a shell script,
\r
1941 then set GIT_SSH to refer to the shell script.</simpara>
\r
1942 <simpara>Usually it is easier to configure any desired options through your
\r
1943 personal <literal>.ssh/config</literal> file. Please consult your ssh documentation
\r
1944 for further details.</simpara>
\r
1949 <emphasis>GIT_FLUSH</emphasis>
\r
1953 If this environment variable is set to "1", then commands such
\r
1954 as <emphasis>git-blame</emphasis> (in incremental mode), <emphasis>git-rev-list</emphasis>, <emphasis>git-log</emphasis>,
\r
1955 and <emphasis>git-whatchanged</emphasis> will force a flush of the output stream
\r
1956 after each commit-oriented record have been flushed. If this
\r
1957 variable is set to "0", the output of these commands will be done
\r
1958 using completely buffered I/O. If this environment variable is
\r
1959 not set, git will choose buffered or record-oriented flushing
\r
1960 based on whether stdout appears to be redirected to a file or not.
\r
1966 <emphasis>GIT_TRACE</emphasis>
\r
1970 If this variable is set to "1", "2" or "true" (comparison
\r
1971 is case insensitive), git will print <literal>trace:</literal> messages on
\r
1972 stderr telling about alias expansion, built-in command
\r
1973 execution and external command execution.
\r
1974 If this variable is set to an integer value greater than 1
\r
1975 and lower than 10 (strictly) then git will interpret this
\r
1976 value as an open file descriptor and will try to write the
\r
1977 trace messages into this file descriptor.
\r
1978 Alternatively, if this variable is set to an absolute path
\r
1979 (starting with a <emphasis>/</emphasis> character), git will interpret this
\r
1980 as a file path and will try to write the trace messages
\r
1988 <simplesect id="_discussion_anchor_id_discussion_xreflabel_discussion">
\r
1989 <title>Discussion<anchor id="Discussion" xreflabel="[Discussion]"/></title>
\r
1990 <simpara>More detail on the following is available from the
\r
1991 <ulink url="user-manual.html#git-concepts">git concepts chapter of the
\r
1992 user-manual</ulink> and <xref linkend="gitcore-tutorial(7)"/>.</simpara>
\r
1993 <simpara>A git project normally consists of a working directory with a ".git"
\r
1994 subdirectory at the top level. The .git directory contains, among other
\r
1995 things, a compressed object database representing the complete history
\r
1996 of the project, an "index" file which links that history to the current
\r
1997 contents of the working tree, and named pointers into that history such
\r
1998 as tags and branch heads.</simpara>
\r
1999 <simpara>The object database contains objects of three main types: blobs, which
\r
2000 hold file data; trees, which point to blobs and other trees to build up
\r
2001 directory hierarchies; and commits, which each reference a single tree
\r
2002 and some number of parent commits.</simpara>
\r
2003 <simpara>The commit, equivalent to what other systems call a "changeset" or
\r
2004 "version", represents a step in the project’s history, and each parent
\r
2005 represents an immediately preceding step. Commits with more than one
\r
2006 parent represent merges of independent lines of development.</simpara>
\r
2007 <simpara>All objects are named by the SHA1 hash of their contents, normally
\r
2008 written as a string of 40 hex digits. Such names are globally unique.
\r
2009 The entire history leading up to a commit can be vouched for by signing
\r
2010 just that commit. A fourth object type, the tag, is provided for this
\r
2011 purpose.</simpara>
\r
2012 <simpara>When first created, objects are stored in individual files, but for
\r
2013 efficiency may later be compressed together into "pack files".</simpara>
\r
2014 <simpara>Named pointers called refs mark interesting points in history. A ref
\r
2015 may contain the SHA1 name of an object or the name of another ref. Refs
\r
2016 with names beginning <literal>ref/head/</literal> contain the SHA1 name of the most
\r
2017 recent commit (or "head") of a branch under development. SHA1 names of
\r
2018 tags of interest are stored under <literal>ref/tags/</literal>. A special ref named
\r
2019 <literal>HEAD</literal> contains the name of the currently checked-out branch.</simpara>
\r
2020 <simpara>The index file is initialized with a list of all paths and, for each
\r
2021 path, a blob object and a set of attributes. The blob object represents
\r
2022 the contents of the file as of the head of the current branch. The
\r
2023 attributes (last modified time, size, etc.) are taken from the
\r
2024 corresponding file in the working tree. Subsequent changes to the
\r
2025 working tree can be found by comparing these attributes. The index may
\r
2026 be updated with new content, and new commits may be created from the
\r
2027 content stored in the index.</simpara>
\r
2028 <simpara>The index is also capable of storing multiple entries (called "stages")
\r
2029 for a given pathname. These stages are used to hold the various
\r
2030 unmerged version of a file when a merge is in progress.</simpara>
\r
2032 <simplesect id="_authors">
\r
2033 <title>Authors</title>
\r
2037 git’s founding father is Linus Torvalds <<ulink url="mailto:torvalds@osdl.org">torvalds@osdl.org</ulink>>.
\r
2042 The current git nurse is Junio C Hamano <<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>>.
\r
2047 The git potty was written by Andreas Ericsson <<ulink url="mailto:ae@op5.se">ae@op5.se</ulink>>.
\r
2052 General upbringing is handled by the git-list <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>>.
\r
2057 <simplesect id="_documentation">
\r
2058 <title>Documentation</title>
\r
2059 <simpara>The documentation for git suite was started by David Greaves
\r
2060 <<ulink url="mailto:david@dgreaves.com">david@dgreaves.com</ulink>>, and later enhanced greatly by the
\r
2061 contributors on the git-list <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>>.</simpara>
\r
2063 <simplesect id="_see_also">
\r
2064 <title>SEE ALSO</title>
\r
2065 <simpara><xref linkend="gittutorial(7)"/>, <xref linkend="gittutorial-2(7)"/>,
\r
2066 <ulink url="everyday.html">Everyday Git</ulink>, <xref linkend="gitcvs-migration(7)"/>,
\r
2067 <xref linkend="gitglossary(7)"/>, <xref linkend="gitcore-tutorial(7)"/>,
\r
2068 <xref linkend="gitcli(7)"/>, <ulink url="user-manual.html">The Git User’s Manual</ulink></simpara>
\r
2070 <simplesect id="_git">
\r
2071 <title>GIT</title>
\r
2072 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
\r