[PATCH 1/4] split core-git.txt and update
[git.git] / Documentation / git.txt
1 git(1)
2 ======
3 v0.1, May 2005
4
5 NAME
6 ----
7 git - the stupid content tracker
8
9
10 SYNOPSIS
11 --------
12 'git-<command>' <args>
13
14 DESCRIPTION
15 -----------
16
17 This is reference information for the core git commands.
18
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!
22
23 David Greaves <david@dgreaves.com>
24 08/05/05
25
26 Updated by Junio C Hamano <junkio@cox.net> on 2005-05-05 to
27 reflect recent changes.
28
29 Commands Overview
30 -----------------
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.
34
35 Manipulation commands
36 ~~~~~~~~~~~~~~~~~~~~~
37 link:git-apply-patch-script.html[git-apply-patch-script]::
38         Sample script to apply the diffs from git-diff-*
39
40 link:git-checkout-cache.html[git-checkout-cache]::
41         Copy files from the cache to the working directory
42
43 link:git-commit-tree.html[git-commit-tree]::
44         Creates a new commit object
45
46 link:git-convert-cache.html[git-convert-cache]::
47         Converts old-style GIT repository
48
49 link:git-http-pull.html[git-http-pull]::
50         Downloads a remote GIT repository via HTTP
51
52 link:git-init-db.html[git-init-db]::
53         Creates an empty git object database
54
55 link:git-local-pull.html[git-local-pull]::
56         Duplicates another GIT repository on a local system
57
58 link:git-merge-base.html[git-merge-base]::
59         Finds as good a common ancestor as possible for a merge
60
61 link:git-merge-one-file-script.html[git-merge-one-file-script]::
62         The standard helper program to use with "git-merge-cache"
63
64 link:git-mktag.html[git-mktag]::
65         Creates a tag object
66
67 link:git-prune-script.html[git-prune-script]::
68         Prunes all unreachable objects from the object database
69
70 link:git-pull-script.html[git-pull-script]::
71         Script used by Linus to pull and merge a remote repository
72
73 link:git-read-tree.html[git-read-tree]::
74         Reads tree information into the directory cache
75
76 link:git-resolve-script.html[git-resolve-script]::
77         Script used to merge two trees
78
79 link:git-rpull.html[git-rpull]::
80         Pulls from a remote repository over ssh connection
81
82 link:git-tag-script.html[git-tag-script]::
83         An example script to create a tag object signed with GPG
84
85 link:git-update-cache.html[git-update-cache]::
86         Modifies the index or directory cache
87
88 link:git-write-blob.html[git-write-blob]::
89         Creates a blob from a file
90
91 link:git-write-tree.html[git-write-tree]::
92         Creates a tree from the current cache
93
94 Interrogation commands
95 ~~~~~~~~~~~~~~~~~~~~~~
96 link:git-cat-file.html[git-cat-file]::
97         Provide content or type information for repository objects
98
99 link:git-check-files.html[git-check-files]::
100         Verify a list of files are up-to-date
101
102 link:git-diff-cache.html[git-diff-cache]::
103         Compares content and mode of blobs between the cache and repository
104
105 link:git-diff-files.html[git-diff-files]::
106         Compares files in the working tree and the cache
107
108 link:git-diff-tree.html[git-diff-tree]::
109         Compares the content and mode of blobs found via two tree objects
110
111 link:git-diff-tree-helper.html[git-diff-tree-helper]::
112         Generates patch format output for git-diff-*
113
114 link:git-export.html[git-export]::
115         Exports each commit and a diff against each of its parents
116
117 link:git-fsck-cache.html[git-fsck-cache]::
118         Verifies the connectivity and validity of the objects in the database
119
120 link:git-ls-files.html[git-ls-files]::
121         Information about files in the cache/working directory
122
123 link:git-ls-tree.html[git-ls-tree]::
124         Displays a tree object in human readable form
125
126 link:git-merge-cache.html[git-merge-cache]::
127         Runs a merge for files needing merging
128
129 link:git-rev-list.html[git-rev-list]::
130         Lists commit objects in reverse chronological order
131
132 link:git-rev-tree.html[git-rev-tree]::
133         Provides the revision tree for one or more commits
134
135 link:git-rpush.html[git-rpush]::
136         Helper "server-side" program used by git-rpull
137
138 link:git-tar-tree.html[git-tar-tree]::
139         Creates a tar archive of the files in the named tree
140
141 link:git-unpack-file.html[git-unpack-file]::
142         Creates a temporary file with a blob's contents
143
144 The interrogate commands may create files - and you can force them to
145 touch the working file set - but in general they don't
146
147
148 Terminology
149 -----------
150 see README for description
151
152 Identifier terminology
153 ----------------------
154 <object>::
155         Indicates any object sha1 identifier
156
157 <blob>::
158         Indicates a blob object sha1 identifier
159
160 <tree>::
161         Indicates a tree object sha1 identifier
162
163 <commit>::
164         Indicates a commit object sha1 identifier
165
166 <tree-ish>::
167         Indicates a tree, commit or tag object sha1 identifier.
168         A command that takes a <tree-ish> argument ultimately
169         wants to operate on a <tree> object but automatically
170         dereferences <commit> and <tag> that points at a
171         <tree>.
172
173 <type>::
174         Indicates that an object type is required.
175         Currently one of: blob/tree/commit/tag
176
177 <file>::
178         Indicates a filename - always relative to the root of
179         the tree structure GIT_INDEX_FILE describes.
180
181 Terminology
182 -----------
183 Each line contains terms used interchangeably
184
185  object database, .git directory
186  directory cache, index
187  id, sha1, sha1-id, sha1 hash
188  type, tag
189  blob, blob object
190  tree, tree object
191  commit, commit object
192  parent
193  root object
194  changeset
195
196
197 Environment Variables
198 ---------------------
199 Various git commands use the following environment variables:
200
201 - 'GIT_AUTHOR_NAME'
202 - 'GIT_AUTHOR_EMAIL'
203 - 'GIT_AUTHOR_DATE'
204 - 'GIT_COMMITTER_NAME'
205 - 'GIT_COMMITTER_EMAIL'
206 - 'GIT_DIFF_OPTS'
207 - 'GIT_EXTERNAL_DIFF'
208 - 'GIT_INDEX_FILE'
209 - 'GIT_OBJECT_DIRECTORY'
210 - 'GIT_ALTERNATE_OBJECT_DIRECTORIES'
211
212
213 Author
214 ------
215 Written by Linus Torvalds <torvalds@osdl.org>
216
217 Documentation
218 --------------
219 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
220
221 GIT
222 ---
223 Part of the link:git.html[git] suite
224