7 git - the stupid content tracker
12 'git-<command>' <args>
17 This is reference information for the core git commands.
19 The link:README[] contains much useful definition and clarification
20 info - read that first. And of the commands, I suggest reading
21 'git-update-cache' and 'git-read-tree' first - I wish I had!
23 David Greaves <david@dgreaves.com>
26 Updated by Junio C Hamano <junkio@cox.net> on 2005-05-05 to
27 reflect recent changes.
31 The git commands can helpfully be split into those that manipulate
32 the repository, the cache and the working fileset and those that
33 interrogate and compare them.
35 There are also some ancilliary programs that can be viewed as useful
36 aids for using the core commands but which are unlikely to be used by
37 SCMs layered over git.
41 link:git-checkout-cache.html[git-checkout-cache]::
42 Copy files from the cache to the working directory
44 link:git-commit-tree.html[git-commit-tree]::
45 Creates a new commit object
47 link:git-init-db.html[git-init-db]::
48 Creates an empty git object database
50 link:git-merge-base.html[git-merge-base]::
51 Finds as good a common ancestor as possible for a merge
53 link:git-mktag.html[git-mktag]::
56 link:git-read-tree.html[git-read-tree]::
57 Reads tree information into the directory cache
59 link:git-update-cache.html[git-update-cache]::
60 Modifies the index or directory cache
62 link:git-write-blob.html[git-write-blob]::
63 Creates a blob from a file
65 link:git-write-tree.html[git-write-tree]::
66 Creates a tree from the current cache
68 Interrogation commands
69 ~~~~~~~~~~~~~~~~~~~~~~
70 link:git-cat-file.html[git-cat-file]::
71 Provide content or type information for repository objects
73 link:git-check-files.html[git-check-files]::
74 Verify a list of files are up-to-date
76 link:git-diff-cache.html[git-diff-cache]::
77 Compares content and mode of blobs between the cache and repository
79 link:git-diff-files.html[git-diff-files]::
80 Compares files in the working tree and the cache
82 link:git-diff-tree.html[git-diff-tree]::
83 Compares the content and mode of blobs found via two tree objects
85 link:git-export.html[git-export]::
86 Exports each commit and a diff against each of its parents
88 link:git-fsck-cache.html[git-fsck-cache]::
89 Verifies the connectivity and validity of the objects in the database
91 link:git-ls-files.html[git-ls-files]::
92 Information about files in the cache/working directory
94 link:git-ls-tree.html[git-ls-tree]::
95 Displays a tree object in human readable form
97 link:git-merge-cache.html[git-merge-cache]::
98 Runs a merge for files needing merging
100 link:git-rev-list.html[git-rev-list]::
101 Lists commit objects in reverse chronological order
103 link:git-rev-tree.html[git-rev-tree]::
104 Provides the revision tree for one or more commits
106 link:git-tar-tree.html[git-tar-tree]::
107 Creates a tar archive of the files in the named tree
109 link:git-unpack-file.html[git-unpack-file]::
110 Creates a temporary file with a blob's contents
112 The interrogate commands may create files - and you can force them to
113 touch the working file set - but in general they don't
120 link:git-apply-patch-script.html[git-apply-patch-script]::
121 Sample script to apply the diffs from git-diff-*
123 link:git-convert-cache.html[git-convert-cache]::
124 Converts old-style GIT repository
126 link:git-http-pull.html[git-http-pull]::
127 Downloads a remote GIT repository via HTTP
129 link:git-local-pull.html[git-local-pull]::
130 Duplicates another GIT repository on a local system
132 link:git-merge-one-file-script.html[git-merge-one-file-script]::
133 The standard helper program to use with "git-merge-cache"
135 link:git-pull-script.html[git-pull-script]::
136 Script used by Linus to pull and merge a remote repository
138 link:git-prune-script.html[git-prune-script]::
139 Prunes all unreachable objects from the object database
141 link:git-resolve-script.html[git-resolve-script]::
142 Script used to merge two trees
144 link:git-tag-script.html[git-tag-script]::
145 An example script to create a tag object signed with GPG
147 link:git-rpull.html[git-rpull]::
148 Pulls from a remote repository over ssh connection
152 link:git-diff-tree-helper.html[git-diff-tree-helper]::
153 Generates patch format output for git-diff-*
155 link:git-rpush.html[git-rpush]::
156 Helper "server-side" program used by git-rpull
162 see README for description
164 Identifier terminology
165 ----------------------
167 Indicates any object sha1 identifier
170 Indicates a blob object sha1 identifier
173 Indicates a tree object sha1 identifier
176 Indicates a commit object sha1 identifier
179 Indicates a tree, commit or tag object sha1 identifier.
180 A command that takes a <tree-ish> argument ultimately
181 wants to operate on a <tree> object but automatically
182 dereferences <commit> and <tag> that points at a
186 Indicates that an object type is required.
187 Currently one of: blob/tree/commit/tag
190 Indicates a filename - always relative to the root of
191 the tree structure GIT_INDEX_FILE describes.
195 Each line contains terms used interchangeably
197 object database, .git directory
198 directory cache, index
199 id, sha1, sha1-id, sha1 hash
203 commit, commit object
209 Environment Variables
210 ---------------------
211 Various git commands use the following environment variables:
216 - 'GIT_COMMITTER_NAME'
217 - 'GIT_COMMITTER_EMAIL'
219 - 'GIT_EXTERNAL_DIFF'
221 - 'GIT_OBJECT_DIRECTORY'
222 - 'GIT_ALTERNATE_OBJECT_DIRECTORIES'
227 Written by Linus Torvalds <torvalds@osdl.org>
231 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
235 Part of the link:git.html[git] suite