1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <sect2 lang="en" id="git(1)">
\r
5 <title>git(1)</title>
\r
7 <primary>git(1)</primary>
\r
9 <simplesect id="git(1)__name">
\r
11 <simpara>git - the stupid content tracker</simpara>
\r
13 <simplesect id="git(1)__synopsis">
\r
14 <title>SYNOPSIS</title>
\r
16 <literallayout><emphasis>git</emphasis> [--version] [--help] [-c <name>=<value>]
\r
17 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
\r
18 [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
\r
19 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
\r
20 <command> [<args>]</literallayout>
\r
23 <simplesect id="git(1)__description">
\r
24 <title>DESCRIPTION</title>
\r
25 <simpara>Git is a fast, scalable, distributed revision control system with an
\r
26 unusually rich command set that provides both high-level operations
\r
27 and full access to internals.</simpara>
\r
28 <simpara>See <xref linkend="gittutorial(7)" /> to get started, then see
\r
29 link:everyday.html[Everyday Git] for a useful minimum set of
\r
30 commands. The link:user-manual.html[Git User's Manual] has a more
\r
31 in-depth introduction.</simpara>
\r
32 <simpara>After you mastered the basic concepts, you can come back to this
\r
33 page to learn what commands git offers. You can learn more about
\r
34 individual git commands with "git help command". <xref linkend="gitcli(7)" />
\r
35 manual page gives you an overview of the command line command syntax.</simpara>
\r
36 <simpara>Formatted and hyperlinked version of the latest git documentation
\r
37 can be viewed at <emphasis>http://git-htmldocs.googlecode.com/git/git.html</emphasis>.</simpara>
\r
39 <simplesect id="git(1)__options">
\r
40 <title>OPTIONS</title>
\r
48 Prints the git suite version that the <emphasis>git</emphasis> program came from.
\r
58 Prints the synopsis and a list of the most commonly used
\r
59 commands. If the option <emphasis>--all</emphasis> or <emphasis>-a</emphasis> is given then all
\r
60 available commands are printed. If a git command is named this
\r
61 option will bring up the manual page for that command.
\r
63 <simpara>Other options are available to control how the manual page is
\r
64 displayed. See <xref linkend="git-help(1)" /> for more information,
\r
65 because <emphasis>git --help ...</emphasis> is converted internally into <emphasis>git
\r
66 help ...</emphasis>.</simpara>
\r
71 -c <name>=<value>
\r
75 Pass a configuration parameter to the command. The value
\r
76 given will override values from configuration files.
\r
77 The <name> is expected in the same format as listed by
\r
78 <emphasis>git config</emphasis> (subkeys separated by dots).
\r
84 --exec-path[=<path>]
\r
88 Path to wherever your core git programs are installed.
\r
89 This can also be controlled by setting the GIT_EXEC_PATH
\r
90 environment variable. If no path is given, <emphasis>git</emphasis> will print
\r
91 the current setting and then exit.
\r
101 Print the path, without trailing slash, where git's HTML
\r
102 documentation is installed and exit.
\r
112 Print the manpath (see <emphasis>man(1)</emphasis>) for the man pages for
\r
113 this version of git and exit.
\r
123 Print the path where the Info files documenting this
\r
124 version of git are installed and exit.
\r
137 Pipe all output into <emphasis>less</emphasis> (or if set, $PAGER) if standard
\r
138 output is a terminal. This overrides the <emphasis>pager.<cmd></emphasis>
\r
139 configuration options (see the "Configuration Mechanism" section
\r
150 Do not pipe git output into a pager.
\r
156 --git-dir=<path>
\r
160 Set the path to the repository. This can also be controlled by
\r
161 setting the GIT_DIR environment variable. It can be an absolute
\r
162 path or relative path to current working directory.
\r
168 --work-tree=<path>
\r
172 Set the path to the working tree. It can be an absolute path
\r
173 or a path relative to the current working directory.
\r
174 This can also be controlled by setting the GIT_WORK_TREE
\r
175 environment variable and the core.worktree configuration
\r
176 variable (see core.worktree in <xref linkend="git-config(1)" /> for a
\r
177 more detailed discussion).
\r
183 --namespace=<path>
\r
187 Set the git namespace. See <xref linkend="gitnamespaces(7)" /> for more
\r
188 details. Equivalent to setting the <emphasis>GIT_NAMESPACE</emphasis> environment
\r
199 Treat the repository as a bare repository. If GIT_DIR
\r
200 environment is not set, it is set to the current working
\r
207 --no-replace-objects
\r
211 Do not use replacement refs to replace git objects. See
\r
212 <xref linkend="git-replace(1)" /> for more information.
\r
218 <simplesect id="git(1)__git_commands">
\r
219 <title>GIT COMMANDS</title>
\r
220 <simpara>We divide git into high level ("porcelain") commands and low level
\r
221 ("plumbing") commands.</simpara>
\r
223 <simplesect id="git(1)__high_level_commands_porcelain">
\r
224 <title>High-level commands (porcelain)</title>
\r
225 <simpara>We separate the porcelain commands into the main commands and some
\r
226 ancillary user utilities.</simpara>
\r
227 <section id="git(1)__main_porcelain_commands">
\r
228 <title>Main porcelain commands</title>
\r
232 <xref linkend="git-add(1)" />
\r
236 Add file contents to the index.
\r
242 <xref linkend="git-am(1)" />
\r
246 Apply a series of patches from a mailbox.
\r
252 <xref linkend="git-archive(1)" />
\r
256 Create an archive of files from a named tree.
\r
262 <xref linkend="git-bisect(1)" />
\r
266 Find by binary search the change that introduced a bug.
\r
272 <xref linkend="git-branch(1)" />
\r
276 List, create, or delete branches.
\r
282 <xref linkend="git-bundle(1)" />
\r
286 Move objects and refs by archive.
\r
292 <xref linkend="git-checkout(1)" />
\r
296 Checkout a branch or paths to the working tree.
\r
302 <xref linkend="git-cherry-pick(1)" />
\r
306 Apply the changes introduced by some existing commits.
\r
312 <xref linkend="git-citool(1)" />
\r
316 Graphical alternative to git-commit.
\r
322 <xref linkend="git-clean(1)" />
\r
326 Remove untracked files from the working tree.
\r
332 <xref linkend="git-clone(1)" />
\r
336 Clone a repository into a new directory.
\r
342 <xref linkend="git-commit(1)" />
\r
346 Record changes to the repository.
\r
352 <xref linkend="git-describe(1)" />
\r
356 Show the most recent tag that is reachable from a commit.
\r
362 <xref linkend="git-diff(1)" />
\r
366 Show changes between commits, commit and working tree, etc.
\r
372 <xref linkend="git-fetch(1)" />
\r
376 Download objects and refs from another repository.
\r
382 <xref linkend="git-format-patch(1)" />
\r
386 Prepare patches for e-mail submission.
\r
392 <xref linkend="git-gc(1)" />
\r
396 Cleanup unnecessary files and optimize the local repository.
\r
402 <xref linkend="git-grep(1)" />
\r
406 Print lines matching a pattern.
\r
412 <xref linkend="git-gui(1)" />
\r
416 A portable graphical interface to Git.
\r
422 <xref linkend="git-init(1)" />
\r
426 Create an empty git repository or reinitialize an existing one.
\r
432 <xref linkend="git-log(1)" />
\r
442 <xref linkend="git-merge(1)" />
\r
446 Join two or more development histories together.
\r
452 <xref linkend="git-mv(1)" />
\r
456 Move or rename a file, a directory, or a symlink.
\r
462 <xref linkend="git-notes(1)" />
\r
466 Add or inspect object notes.
\r
472 <xref linkend="git-pull(1)" />
\r
476 Fetch from and merge with another repository or a local branch.
\r
482 <xref linkend="git-push(1)" />
\r
486 Update remote refs along with associated objects.
\r
492 <xref linkend="git-rebase(1)" />
\r
496 Forward-port local commits to the updated upstream head.
\r
502 <xref linkend="git-reset(1)" />
\r
506 Reset current HEAD to the specified state.
\r
512 <xref linkend="git-revert(1)" />
\r
516 Revert some existing commits.
\r
522 <xref linkend="git-rm(1)" />
\r
526 Remove files from the working tree and from the index.
\r
532 <xref linkend="git-shortlog(1)" />
\r
536 Summarize <emphasis>git log</emphasis> output.
\r
542 <xref linkend="git-show(1)" />
\r
546 Show various types of objects.
\r
552 <xref linkend="git-stash(1)" />
\r
556 Stash the changes in a dirty working directory away.
\r
562 <xref linkend="git-status(1)" />
\r
566 Show the working tree status.
\r
572 <xref linkend="git-submodule(1)" />
\r
576 Initialize, update or inspect submodules.
\r
582 <xref linkend="git-tag(1)" />
\r
586 Create, list, delete or verify a tag object signed with GPG.
\r
592 <xref linkend="gitk(1)" />
\r
596 The git repository browser.
\r
602 <section id="git(1)__ancillary_commands">
\r
603 <title>Ancillary Commands</title>
\r
604 <simpara>Manipulators:</simpara>
\r
608 <xref linkend="git-config(1)" />
\r
612 Get and set repository or global options.
\r
618 <xref linkend="git-fast-export(1)" />
\r
628 <xref linkend="git-fast-import(1)" />
\r
632 Backend for fast Git data importers.
\r
638 <xref linkend="git-filter-branch(1)" />
\r
648 <xref linkend="git-lost-found(1)" />
\r
652 (deprecated) Recover lost refs that luckily have not yet been pruned.
\r
658 <xref linkend="git-mergetool(1)" />
\r
662 Run merge conflict resolution tools to resolve merge conflicts.
\r
668 <xref linkend="git-pack-refs(1)" />
\r
672 Pack heads and tags for efficient repository access.
\r
678 <xref linkend="git-prune(1)" />
\r
682 Prune all unreachable objects from the object database.
\r
688 <xref linkend="git-reflog(1)" />
\r
692 Manage reflog information.
\r
698 <xref linkend="git-relink(1)" />
\r
702 Hardlink common objects in local repositories.
\r
708 <xref linkend="git-remote(1)" />
\r
712 manage set of tracked repositories.
\r
718 <xref linkend="git-repack(1)" />
\r
722 Pack unpacked objects in a repository.
\r
728 <xref linkend="git-replace(1)" />
\r
732 Create, list, delete refs to replace objects.
\r
738 <xref linkend="git-repo-config(1)" />
\r
742 (deprecated) Get and set repository or global options.
\r
747 <simpara>Interrogators:</simpara>
\r
751 <xref linkend="git-annotate(1)" />
\r
755 Annotate file lines with commit information.
\r
761 <xref linkend="git-blame(1)" />
\r
765 Show what revision and author last modified each line of a file.
\r
771 <xref linkend="git-cherry(1)" />
\r
775 Find commits not merged upstream.
\r
781 <xref linkend="git-count-objects(1)" />
\r
785 Count unpacked number of objects and their disk consumption.
\r
791 <xref linkend="git-difftool(1)" />
\r
795 Show changes using common diff tools.
\r
801 <xref linkend="git-fsck(1)" />
\r
805 Verifies the connectivity and validity of the objects in the database.
\r
811 <xref linkend="git-get-tar-commit-id(1)" />
\r
815 Extract commit ID from an archive created using git-archive.
\r
821 <xref linkend="git-help(1)" />
\r
825 display help information about git.
\r
831 <xref linkend="git-instaweb(1)" />
\r
835 Instantly browse your working repository in gitweb.
\r
841 <xref linkend="git-merge-tree(1)" />
\r
845 Show three-way merge without touching index.
\r
851 <xref linkend="git-rerere(1)" />
\r
855 Reuse recorded resolution of conflicted merges.
\r
861 <xref linkend="git-rev-parse(1)" />
\r
865 Pick out and massage parameters.
\r
871 <xref linkend="git-show-branch(1)" />
\r
875 Show branches and their commits.
\r
881 <xref linkend="git-verify-tag(1)" />
\r
885 Check the GPG signature of tags.
\r
891 <xref linkend="git-whatchanged(1)" />
\r
895 Show logs with difference each commit introduces.
\r
901 <xref linkend="gitweb(1)" />
\r
905 Git web interface (web frontend to Git repositories).
\r
911 <section id="git(1)__interacting_with_others">
\r
912 <title>Interacting with Others</title>
\r
913 <simpara>These commands are to interact with foreign SCM and with other
\r
914 people via patch over e-mail.</simpara>
\r
918 <xref linkend="git-archimport(1)" />
\r
922 Import an Arch repository into git.
\r
928 <xref linkend="git-cvsexportcommit(1)" />
\r
932 Export a single commit to a CVS checkout.
\r
938 <xref linkend="git-cvsimport(1)" />
\r
942 Salvage your data out of another SCM people love to hate.
\r
948 <xref linkend="git-cvsserver(1)" />
\r
952 A CVS server emulator for git.
\r
958 <xref linkend="git-imap-send(1)" />
\r
962 Send a collection of patches from stdin to an IMAP folder.
\r
968 <xref linkend="git-p4(1)" />
\r
972 Import from and submit to Perforce repositories.
\r
978 <xref linkend="git-quiltimport(1)" />
\r
982 Applies a quilt patchset onto the current branch.
\r
988 <xref linkend="git-request-pull(1)" />
\r
992 Generates a summary of pending changes.
\r
998 <xref linkend="git-send-email(1)" />
\r
1002 Send a collection of patches as emails.
\r
1008 <xref linkend="git-svn(1)" />
\r
1012 Bidirectional operation between a Subversion repository and git.
\r
1019 <simplesect id="git(1)__low_level_commands_plumbing">
\r
1020 <title>Low-level commands (plumbing)</title>
\r
1021 <simpara>Although git includes its
\r
1022 own porcelain layer, its low-level commands are sufficient to support
\r
1023 development of alternative porcelains. Developers of such porcelains
\r
1024 might start by reading about <xref linkend="git-update-index(1)" /> and
\r
1025 <xref linkend="git-read-tree(1)" />.</simpara>
\r
1026 <simpara>The interface (input, output, set of options and the semantics)
\r
1027 to these low-level commands are meant to be a lot more stable
\r
1028 than Porcelain level commands, because these commands are
\r
1029 primarily for scripted use. The interface to Porcelain commands
\r
1030 on the other hand are subject to change in order to improve the
\r
1031 end user experience.</simpara>
\r
1032 <simpara>The following description divides
\r
1033 the low-level commands into commands that manipulate objects (in
\r
1034 the repository, index, and working tree), commands that interrogate and
\r
1035 compare objects, and commands that move objects and references between
\r
1036 repositories.</simpara>
\r
1037 <section id="git(1)__manipulation_commands">
\r
1038 <title>Manipulation commands</title>
\r
1042 <xref linkend="git-apply(1)" />
\r
1046 Apply a patch to files and/or to the index.
\r
1052 <xref linkend="git-checkout-index(1)" />
\r
1056 Copy files from the index to the working tree.
\r
1062 <xref linkend="git-commit-tree(1)" />
\r
1066 Create a new commit object.
\r
1072 <xref linkend="git-hash-object(1)" />
\r
1076 Compute object ID and optionally creates a blob from a file.
\r
1082 <xref linkend="git-index-pack(1)" />
\r
1086 Build pack index file for an existing packed archive.
\r
1092 <xref linkend="git-merge-file(1)" />
\r
1096 Run a three-way file merge.
\r
1102 <xref linkend="git-merge-index(1)" />
\r
1106 Run a merge for files needing merging.
\r
1112 <xref linkend="git-mktag(1)" />
\r
1116 Creates a tag object.
\r
1122 <xref linkend="git-mktree(1)" />
\r
1126 Build a tree-object from ls-tree formatted text.
\r
1132 <xref linkend="git-pack-objects(1)" />
\r
1136 Create a packed archive of objects.
\r
1142 <xref linkend="git-prune-packed(1)" />
\r
1146 Remove extra objects that are already in pack files.
\r
1152 <xref linkend="git-read-tree(1)" />
\r
1156 Reads tree information into the index.
\r
1162 <xref linkend="git-symbolic-ref(1)" />
\r
1166 Read, modify and delete symbolic refs.
\r
1172 <xref linkend="git-unpack-objects(1)" />
\r
1176 Unpack objects from a packed archive.
\r
1182 <xref linkend="git-update-index(1)" />
\r
1186 Register file contents in the working tree to the index.
\r
1192 <xref linkend="git-update-ref(1)" />
\r
1196 Update the object name stored in a ref safely.
\r
1202 <xref linkend="git-write-tree(1)" />
\r
1206 Create a tree object from the current index.
\r
1212 <section id="git(1)__interrogation_commands">
\r
1213 <title>Interrogation commands</title>
\r
1217 <xref linkend="git-cat-file(1)" />
\r
1221 Provide content or type and size information for repository objects.
\r
1227 <xref linkend="git-diff-files(1)" />
\r
1231 Compares files in the working tree and the index.
\r
1237 <xref linkend="git-diff-index(1)" />
\r
1241 Compares content and mode of blobs between the index and repository.
\r
1247 <xref linkend="git-diff-tree(1)" />
\r
1251 Compares the content and mode of blobs found via two tree objects.
\r
1257 <xref linkend="git-for-each-ref(1)" />
\r
1261 Output information on each ref.
\r
1267 <xref linkend="git-ls-files(1)" />
\r
1271 Show information about files in the index and the working tree.
\r
1277 <xref linkend="git-ls-remote(1)" />
\r
1281 List references in a remote repository.
\r
1287 <xref linkend="git-ls-tree(1)" />
\r
1291 List the contents of a tree object.
\r
1297 <xref linkend="git-merge-base(1)" />
\r
1301 Find as good common ancestors as possible for a merge.
\r
1307 <xref linkend="git-name-rev(1)" />
\r
1311 Find symbolic names for given revs.
\r
1317 <xref linkend="git-pack-redundant(1)" />
\r
1321 Find redundant pack files.
\r
1327 <xref linkend="git-rev-list(1)" />
\r
1331 Lists commit objects in reverse chronological order.
\r
1337 <xref linkend="git-show-index(1)" />
\r
1341 Show packed archive index.
\r
1347 <xref linkend="git-show-ref(1)" />
\r
1351 List references in a local repository.
\r
1357 <xref linkend="git-tar-tree(1)" />
\r
1361 (deprecated) Create a tar archive of the files in the named tree object.
\r
1367 <xref linkend="git-unpack-file(1)" />
\r
1371 Creates a temporary file with a blob's contents.
\r
1377 <xref linkend="git-var(1)" />
\r
1381 Show a git logical variable.
\r
1387 <xref linkend="git-verify-pack(1)" />
\r
1391 Validate packed git archive files.
\r
1396 <simpara>In general, the interrogate commands do not touch the files in
\r
1397 the working tree.</simpara>
\r
1399 <section id="git(1)__synching_repositories">
\r
1400 <title>Synching repositories</title>
\r
1404 <xref linkend="git-daemon(1)" />
\r
1408 A really simple server for git repositories.
\r
1414 <xref linkend="git-fetch-pack(1)" />
\r
1418 Receive missing objects from another repository.
\r
1424 <xref linkend="git-http-backend(1)" />
\r
1428 Server side implementation of Git over HTTP.
\r
1434 <xref linkend="git-send-pack(1)" />
\r
1438 Push objects over git protocol to another repository.
\r
1444 <xref linkend="git-update-server-info(1)" />
\r
1448 Update auxiliary info file to help dumb servers.
\r
1453 <simpara>The following are helper commands used by the above; end users
\r
1454 typically do not use them directly.</simpara>
\r
1458 <xref linkend="git-http-fetch(1)" />
\r
1462 Download from a remote git repository via HTTP.
\r
1468 <xref linkend="git-http-push(1)" />
\r
1472 Push objects over HTTP/DAV to another repository.
\r
1478 <xref linkend="git-parse-remote(1)" />
\r
1482 Routines to help parsing remote repository access parameters.
\r
1488 <xref linkend="git-receive-pack(1)" />
\r
1492 Receive what is pushed into the repository.
\r
1498 <xref linkend="git-shell(1)" />
\r
1502 Restricted login shell for Git-only SSH access.
\r
1508 <xref linkend="git-upload-archive(1)" />
\r
1512 Send archive back to git-archive.
\r
1518 <xref linkend="git-upload-pack(1)" />
\r
1522 Send objects packed back to git-fetch-pack.
\r
1528 <section id="git(1)__internal_helper_commands">
\r
1529 <title>Internal helper commands</title>
\r
1530 <simpara>These are internal helper commands used by other commands; end
\r
1531 users typically do not use them directly.</simpara>
\r
1535 <xref linkend="git-check-attr(1)" />
\r
1539 Display gitattributes information.
\r
1545 <xref linkend="git-check-ref-format(1)" />
\r
1549 Ensures that a reference name is well formed.
\r
1555 <xref linkend="git-column(1)" />
\r
1559 Display data in columns.
\r
1565 <xref linkend="git-credential(1)" />
\r
1569 Retrieve and store user credentials.
\r
1575 <xref linkend="git-credential-cache(1)" />
\r
1579 Helper to temporarily store passwords in memory.
\r
1585 <xref linkend="git-credential-store(1)" />
\r
1589 Helper to store credentials on disk.
\r
1595 <xref linkend="git-fmt-merge-msg(1)" />
\r
1599 Produce a merge commit message.
\r
1605 <xref linkend="git-mailinfo(1)" />
\r
1609 Extracts patch and authorship from a single e-mail message.
\r
1615 <xref linkend="git-mailsplit(1)" />
\r
1619 Simple UNIX mbox splitter program.
\r
1625 <xref linkend="git-merge-one-file(1)" />
\r
1629 The standard helper program to use with git-merge-index.
\r
1635 <xref linkend="git-patch-id(1)" />
\r
1639 Compute unique ID for a patch.
\r
1645 <xref linkend="git-peek-remote(1)" />
\r
1649 (deprecated) List the references in a remote repository.
\r
1655 <xref linkend="git-sh-i18n(1)" />
\r
1659 Git's i18n setup code for shell scripts.
\r
1665 <xref linkend="git-sh-setup(1)" />
\r
1669 Common git shell script setup code.
\r
1675 <xref linkend="git-stripspace(1)" />
\r
1679 Remove unnecessary whitespace.
\r
1686 <simplesect id="git(1)__configuration_mechanism">
\r
1687 <title>Configuration Mechanism</title>
\r
1688 <simpara>Starting from 0.99.9 (actually mid 0.99.8.GIT), <emphasis>.git/config</emphasis> file
\r
1689 is used to hold per-repository configuration options. It is a
\r
1690 simple text file modeled after <emphasis>.ini</emphasis> format familiar to some
\r
1691 people. Here is an example:</simpara>
\r
1693 # A '#' or ';' character indicates a comment.
\r
1698 ; Don't trust file modes
\r
1703 name = "Junio C Hamano"
\r
1704 email = "junkio@twinsun.com"</screen>
\r
1705 <simpara>Various commands read from the configuration file and adjust
\r
1706 their operation accordingly. See <xref linkend="git-config(1)" /> for a
\r
1709 <simplesect id="git(1)__identifier_terminology">
\r
1710 <title>Identifier Terminology</title>
\r
1718 Indicates the object name for any type of object.
\r
1728 Indicates a blob object name.
\r
1738 Indicates a tree object name.
\r
1748 Indicates a commit object name.
\r
1758 Indicates a tree, commit or tag object name. A
\r
1759 command that takes a <tree-ish> argument ultimately wants to
\r
1760 operate on a <tree> object but automatically dereferences
\r
1761 <commit> and <tag> objects that point at a <tree>.
\r
1767 <commit-ish>
\r
1771 Indicates a commit or tag object name. A
\r
1772 command that takes a <commit-ish> argument ultimately wants to
\r
1773 operate on a <commit> object but automatically dereferences
\r
1774 <tag> objects that point at a <commit>.
\r
1784 Indicates that an object type is required.
\r
1785 Currently one of: <emphasis>blob</emphasis>, <emphasis>tree</emphasis>, <emphasis>commit</emphasis>, or <emphasis>tag</emphasis>.
\r
1795 Indicates a filename - almost always relative to the
\r
1796 root of the tree structure <emphasis>GIT_INDEX_FILE</emphasis> describes.
\r
1802 <simplesect id="git(1)__symbolic_identifiers">
\r
1803 <title>Symbolic Identifiers</title>
\r
1804 <simpara>Any git command accepting any <object> can also use the following
\r
1805 symbolic notation:</simpara>
\r
1813 indicates the head of the current branch.
\r
1823 a valid tag <emphasis>name</emphasis>
\r
1824 (i.e. a <emphasis>refs/tags/<tag></emphasis> reference).
\r
1834 a valid head <emphasis>name</emphasis>
\r
1835 (i.e. a <emphasis>refs/heads/<head></emphasis> reference).
\r
1840 <simpara>For a more complete list of ways to spell object names, see
\r
1841 "SPECIFYING REVISIONS" section in <xref linkend="gitrevisions(7)" />.</simpara>
\r
1843 <simplesect id="git(1)__file_directory_structure">
\r
1844 <title>File/Directory Structure</title>
\r
1845 <simpara>Please see the <xref linkend="gitrepository-layout(5)" /> document.</simpara>
\r
1846 <simpara>Read <xref linkend="githooks(5)" /> for more details about each hook.</simpara>
\r
1847 <simpara>Higher level SCMs may provide and manage additional information in the
\r
1848 <emphasis>$GIT_DIR</emphasis>.</simpara>
\r
1850 <simplesect id="git(1)__terminology">
\r
1851 <title>Terminology</title>
\r
1852 <simpara>Please see <xref linkend="gitglossary(7)" />.</simpara>
\r
1854 <simplesect id="git(1)__environment_variables">
\r
1855 <title>Environment Variables</title>
\r
1856 <simpara>Various git commands use the following environment variables:</simpara>
\r
1857 <section id="git(1)__the_git_repository">
\r
1858 <title>The git Repository</title>
\r
1859 <simpara>These environment variables apply to <emphasis>all</emphasis> core git commands. Nb: it
\r
1860 is worth noting that they may be used/overridden by SCMS sitting above
\r
1861 git so take care if using Cogito etc.</simpara>
\r
1865 <emphasis>GIT_INDEX_FILE</emphasis>
\r
1869 This environment allows the specification of an alternate
\r
1870 index file. If not specified, the default of <emphasis>$GIT_DIR/index</emphasis>
\r
1877 <emphasis>GIT_OBJECT_DIRECTORY</emphasis>
\r
1881 If the object storage directory is specified via this
\r
1882 environment variable then the sha1 directories are created
\r
1883 underneath - otherwise the default <emphasis>$GIT_DIR/objects</emphasis>
\r
1884 directory is used.
\r
1890 <emphasis>GIT_ALTERNATE_OBJECT_DIRECTORIES</emphasis>
\r
1894 Due to the immutable nature of git objects, old objects can be
\r
1895 archived into shared, read-only directories. This variable
\r
1896 specifies a ":" separated (on Windows ";" separated) list
\r
1897 of git object directories which can be used to search for git
\r
1898 objects. New objects will not be written to these directories.
\r
1904 <emphasis>GIT_DIR</emphasis>
\r
1908 If the <emphasis>GIT_DIR</emphasis> environment variable is set then it
\r
1909 specifies a path to use instead of the default <emphasis>.git</emphasis>
\r
1910 for the base of the repository.
\r
1911 The <emphasis>--git-dir</emphasis> command-line option also sets this value.
\r
1917 <emphasis>GIT_WORK_TREE</emphasis>
\r
1921 Set the path to the working tree. The value will not be
\r
1922 used in combination with repositories found automatically in
\r
1923 a .git directory (i.e. $GIT_DIR is not set).
\r
1924 This can also be controlled by the <emphasis>--work-tree</emphasis> command line
\r
1925 option and the core.worktree configuration variable.
\r
1931 <emphasis>GIT_NAMESPACE</emphasis>
\r
1935 Set the git namespace; see <xref linkend="gitnamespaces(7)" /> for details.
\r
1936 The <emphasis>--namespace</emphasis> command-line option also sets this value.
\r
1942 <emphasis>GIT_CEILING_DIRECTORIES</emphasis>
\r
1946 This should be a colon-separated list of absolute paths.
\r
1947 If set, it is a list of directories that git should not chdir
\r
1948 up into while looking for a repository directory.
\r
1949 It will not exclude the current working directory or
\r
1950 a GIT_DIR set on the command line or in the environment.
\r
1951 (Useful for excluding slow-loading network directories.)
\r
1957 <emphasis>GIT_DISCOVERY_ACROSS_FILESYSTEM</emphasis>
\r
1961 When run in a directory that does not have ".git" repository
\r
1962 directory, git tries to find such a directory in the parent
\r
1963 directories to find the top of the working tree, but by default it
\r
1964 does not cross filesystem boundaries. This environment variable
\r
1965 can be set to true to tell git not to stop at filesystem
\r
1966 boundaries. Like <emphasis>GIT_CEILING_DIRECTORIES</emphasis>, this will not affect
\r
1967 an explicit repository directory set via <emphasis>GIT_DIR</emphasis> or on the
\r
1974 <section id="git(1)__git_commits">
\r
1975 <title>git Commits</title>
\r
1979 <emphasis>GIT_AUTHOR_NAME</emphasis>
\r
1982 <emphasis>GIT_AUTHOR_EMAIL</emphasis>
\r
1985 <emphasis>GIT_AUTHOR_DATE</emphasis>
\r
1988 <emphasis>GIT_COMMITTER_NAME</emphasis>
\r
1991 <emphasis>GIT_COMMITTER_EMAIL</emphasis>
\r
1994 <emphasis>GIT_COMMITTER_DATE</emphasis>
\r
1997 <emphasis>EMAIL</emphasis>
\r
2001 see <xref linkend="git-commit-tree(1)" />
\r
2007 <section id="git(1)__git_diffs">
\r
2008 <title>git Diffs</title>
\r
2012 <emphasis>GIT_DIFF_OPTS</emphasis>
\r
2016 Only valid setting is "--unified=??" or "-u??" to set the
\r
2017 number of context lines shown when a unified diff is created.
\r
2018 This takes precedence over any "-U" or "--unified" option
\r
2019 value passed on the git diff command line.
\r
2025 <emphasis>GIT_EXTERNAL_DIFF</emphasis>
\r
2029 When the environment variable <emphasis>GIT_EXTERNAL_DIFF</emphasis> is set, the
\r
2030 program named by it is called, instead of the diff invocation
\r
2031 described above. For a path that is added, removed, or modified,
\r
2032 <emphasis>GIT_EXTERNAL_DIFF</emphasis> is called with 7 parameters:
\r
2034 <literallayout class="monospaced">path old-file old-hex old-mode new-file new-hex new-mode</literallayout>
\r
2035 <simpara>where:</simpara>
\r
2040 <old|new>-file
\r
2044 are files GIT_EXTERNAL_DIFF can use to read the
\r
2045 contents of <old|new>,
\r
2051 <old|new>-hex
\r
2055 are the 40-hexdigit SHA1 hashes,
\r
2061 <old|new>-mode
\r
2065 are the octal representation of the file modes.
\r
2067 <simpara>The file parameters can point at the user's working file
\r
2068 (e.g. <emphasis>new-file</emphasis> in "git-diff-files"), <emphasis>/dev/null</emphasis> (e.g. <emphasis>old-file</emphasis>
\r
2069 when a new file is added), or a temporary file (e.g. <emphasis>old-file</emphasis> in the
\r
2070 index). <emphasis>GIT_EXTERNAL_DIFF</emphasis> should not worry about unlinking the
\r
2071 temporary file --- it is removed when <emphasis>GIT_EXTERNAL_DIFF</emphasis> exits.</simpara>
\r
2072 <simpara>For a path that is unmerged, <emphasis>GIT_EXTERNAL_DIFF</emphasis> is called with 1
\r
2073 parameter, <path>.</simpara>
\r
2078 <section id="git(1)__other">
\r
2079 <title>other</title>
\r
2083 <emphasis>GIT_MERGE_VERBOSITY</emphasis>
\r
2087 A number controlling the amount of output shown by
\r
2088 the recursive merge strategy. Overrides merge.verbosity.
\r
2089 See <xref linkend="git-merge(1)" />
\r
2095 <emphasis>GIT_PAGER</emphasis>
\r
2099 This environment variable overrides <emphasis>$PAGER</emphasis>. If it is set
\r
2100 to an empty string or to the value "cat", git will not launch
\r
2101 a pager. See also the <emphasis>core.pager</emphasis> option in
\r
2102 <xref linkend="git-config(1)" />.
\r
2108 <emphasis>GIT_EDITOR</emphasis>
\r
2112 This environment variable overrides <emphasis>$EDITOR</emphasis> and <emphasis>$VISUAL</emphasis>.
\r
2113 It is used by several git commands when, on interactive mode,
\r
2114 an editor is to be launched. See also <xref linkend="git-var(1)" />
\r
2115 and the <emphasis>core.editor</emphasis> option in <xref linkend="git-config(1)" />.
\r
2121 <emphasis>GIT_SSH</emphasis>
\r
2125 If this environment variable is set then <emphasis>git fetch</emphasis>
\r
2126 and <emphasis>git push</emphasis> will use this command instead
\r
2127 of <emphasis>ssh</emphasis> when they need to connect to a remote system.
\r
2128 The <emphasis>$GIT_SSH</emphasis> command will be given exactly two arguments:
\r
2129 the <emphasis>username@host</emphasis> (or just <emphasis>host</emphasis>) from the URL and the
\r
2130 shell command to execute on that remote system.
\r
2132 <simpara>To pass options to the program that you want to list in GIT_SSH
\r
2133 you will need to wrap the program and options into a shell script,
\r
2134 then set GIT_SSH to refer to the shell script.</simpara>
\r
2135 <simpara>Usually it is easier to configure any desired options through your
\r
2136 personal <emphasis>.ssh/config</emphasis> file. Please consult your ssh documentation
\r
2137 for further details.</simpara>
\r
2142 <emphasis>GIT_ASKPASS</emphasis>
\r
2146 If this environment variable is set, then git commands which need to
\r
2147 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
\r
2148 will call this program with a suitable prompt as command line argument
\r
2149 and read the password from its STDOUT. See also the <emphasis>core.askpass</emphasis>
\r
2150 option in <xref linkend="git-config(1)" />.
\r
2156 <emphasis>GIT_FLUSH</emphasis>
\r
2160 If this environment variable is set to "1", then commands such
\r
2161 as <emphasis>git blame</emphasis> (in incremental mode), <emphasis>git rev-list</emphasis>, <emphasis>git log</emphasis>,
\r
2162 and <emphasis>git whatchanged</emphasis> will force a flush of the output stream
\r
2163 after each commit-oriented record have been flushed. If this
\r
2164 variable is set to "0", the output of these commands will be done
\r
2165 using completely buffered I/O. If this environment variable is
\r
2166 not set, git will choose buffered or record-oriented flushing
\r
2167 based on whether stdout appears to be redirected to a file or not.
\r
2173 <emphasis>GIT_TRACE</emphasis>
\r
2177 If this variable is set to "1", "2" or "true" (comparison
\r
2178 is case insensitive), git will print <emphasis>trace:</emphasis> messages on
\r
2179 stderr telling about alias expansion, built-in command
\r
2180 execution and external command execution.
\r
2181 If this variable is set to an integer value greater than 1
\r
2182 and lower than 10 (strictly) then git will interpret this
\r
2183 value as an open file descriptor and will try to write the
\r
2184 trace messages into this file descriptor.
\r
2185 Alternatively, if this variable is set to an absolute path
\r
2186 (starting with a <emphasis>/</emphasis> character), git will interpret this
\r
2187 as a file path and will try to write the trace messages
\r
2195 <simplesect id="git(1)__discussion_anchor_id_git_1__discussion_xreflabel_discussion">
\r
2196 <title>Discussion<anchor id="git(1)_Discussion" xreflabel="[Discussion]"/></title>
\r
2197 <simpara>More detail on the following is available from the
\r
2198 <link linkend="git-concepts">git concepts chapter of the
\r
2199 user-manual</link> and <xref linkend="gitcore-tutorial(7)" />.</simpara>
\r
2200 <simpara>A git project normally consists of a working directory with a ".git"
\r
2201 subdirectory at the top level. The .git directory contains, among other
\r
2202 things, a compressed object database representing the complete history
\r
2203 of the project, an "index" file which links that history to the current
\r
2204 contents of the working tree, and named pointers into that history such
\r
2205 as tags and branch heads.</simpara>
\r
2206 <simpara>The object database contains objects of three main types: blobs, which
\r
2207 hold file data; trees, which point to blobs and other trees to build up
\r
2208 directory hierarchies; and commits, which each reference a single tree
\r
2209 and some number of parent commits.</simpara>
\r
2210 <simpara>The commit, equivalent to what other systems call a "changeset" or
\r
2211 "version", represents a step in the project's history, and each parent
\r
2212 represents an immediately preceding step. Commits with more than one
\r
2213 parent represent merges of independent lines of development.</simpara>
\r
2214 <simpara>All objects are named by the SHA1 hash of their contents, normally
\r
2215 written as a string of 40 hex digits. Such names are globally unique.
\r
2216 The entire history leading up to a commit can be vouched for by signing
\r
2217 just that commit. A fourth object type, the tag, is provided for this
\r
2218 purpose.</simpara>
\r
2219 <simpara>When first created, objects are stored in individual files, but for
\r
2220 efficiency may later be compressed together into "pack files".</simpara>
\r
2221 <simpara>Named pointers called refs mark interesting points in history. A ref
\r
2222 may contain the SHA1 name of an object or the name of another ref. Refs
\r
2223 with names beginning <emphasis>ref/head/</emphasis> contain the SHA1 name of the most
\r
2224 recent commit (or "head") of a branch under development. SHA1 names of
\r
2225 tags of interest are stored under <emphasis>ref/tags/</emphasis>. A special ref named
\r
2226 <emphasis>HEAD</emphasis> contains the name of the currently checked-out branch.</simpara>
\r
2227 <simpara>The index file is initialized with a list of all paths and, for each
\r
2228 path, a blob object and a set of attributes. The blob object represents
\r
2229 the contents of the file as of the head of the current branch. The
\r
2230 attributes (last modified time, size, etc.) are taken from the
\r
2231 corresponding file in the working tree. Subsequent changes to the
\r
2232 working tree can be found by comparing these attributes. The index may
\r
2233 be updated with new content, and new commits may be created from the
\r
2234 content stored in the index.</simpara>
\r
2235 <simpara>The index is also capable of storing multiple entries (called "stages")
\r
2236 for a given pathname. These stages are used to hold the various
\r
2237 unmerged version of a file when a merge is in progress.</simpara>
\r
2239 <simplesect id="git(1)__further_documentation">
\r
2240 <title>FURTHER DOCUMENTATION</title>
\r
2241 <simpara>See the references in the "description" section to get started
\r
2242 using git. The following is probably more detail than necessary
\r
2243 for a first-time user.</simpara>
\r
2244 <simpara>The <link linkend="git-concepts">git concepts chapter of the
\r
2245 user-manual</link> and <xref linkend="gitcore-tutorial(7)" /> both provide
\r
2246 introductions to the underlying git architecture.</simpara>
\r
2247 <simpara>See <xref linkend="gitworkflows(7)" /> for an overview of recommended workflows.</simpara>
\r
2248 <simpara>See also the link:howto-index.html[howto] documents for some useful
\r
2249 examples.</simpara>
\r
2250 <simpara>The internals are documented in the
\r
2251 link:technical/api-index.html[GIT API documentation].</simpara>
\r
2252 <simpara>Users migrating from CVS may also want to
\r
2253 read <xref linkend="gitcvs-migration(7)" />.</simpara>
\r
2255 <simplesect id="git(1)__authors">
\r
2256 <title>Authors</title>
\r
2257 <simpara>Git was started by Linus Torvalds, and is currently maintained by Junio
\r
2258 C Hamano. Numerous contributions have come from the git mailing list
\r
2259 <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>>. <ulink url="http://www.ohloh.net/p/git/contributors/summary">http://www.ohloh.net/p/git/contributors/summary</ulink>
\r
2260 gives you a more complete list of contributors.</simpara>
\r
2261 <simpara>If you have a clone of git.git itself, the
\r
2262 output of <xref linkend="git-shortlog(1)" /> and <xref linkend="git-blame(1)" /> can show you
\r
2263 the authors for specific parts of the project.</simpara>
\r
2265 <simplesect id="git(1)__reporting_bugs">
\r
2266 <title>Reporting Bugs</title>
\r
2267 <simpara>Report bugs to the Git mailing list <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>> where the
\r
2268 development and maintenance is primarily done. You do not have to be
\r
2269 subscribed to the list to send a message there.</simpara>
\r
2271 <simplesect id="git(1)__see_also">
\r
2272 <title>SEE ALSO</title>
\r
2273 <simpara><xref linkend="gittutorial(7)" />, <xref linkend="gittutorial-2(7)" />,
\r
2274 link:everyday.html[Everyday Git], <xref linkend="gitcvs-migration(7)" />,
\r
2275 <xref linkend="gitglossary(7)" />, <xref linkend="gitcore-tutorial(7)" />,
\r
2276 <xref linkend="gitcli(7)" />, link:user-manual.html[The Git User's Manual],
\r
2277 <xref linkend="gitworkflows(7)" /></simpara>
\r
2279 <simplesect id="git(1)__git">
\r
2280 <title>GIT</title>
\r
2281 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r