[PATCH 1/4] split core-git.txt and update
[git/git.git] / Documentation / git.txt
CommitLineData
2cf565c5
DG
1git(1)
2======
3v0.1, May 2005
4
5NAME
6----
7git - the stupid content tracker
8
9
10SYNOPSIS
11--------
12'git-<command>' <args>
13
14DESCRIPTION
15-----------
16
17This is reference information for the core git commands.
18
19The link:README[] contains much useful definition and clarification
20info - read that first. And of the commands, I suggest reading
21'git-update-cache' and 'git-read-tree' first - I wish I had!
22
23David Greaves <david@dgreaves.com>
2408/05/05
25
26Updated by Junio C Hamano <junkio@cox.net> on 2005-05-05 to
27reflect recent changes.
28
29Commands Overview
30-----------------
31The git commands can helpfully be split into those that manipulate
32the repository, the cache and the working fileset and those that
33interrogate and compare them.
34
35Manipulation commands
36~~~~~~~~~~~~~~~~~~~~~
37link:git-apply-patch-script.html[git-apply-patch-script]::
38 Sample script to apply the diffs from git-diff-*
39
40link:git-checkout-cache.html[git-checkout-cache]::
41 Copy files from the cache to the working directory
42
43link:git-commit-tree.html[git-commit-tree]::
44 Creates a new commit object
45
46link:git-convert-cache.html[git-convert-cache]::
47 Converts old-style GIT repository
48
49link:git-http-pull.html[git-http-pull]::
50 Downloads a remote GIT repository via HTTP
51
52link:git-init-db.html[git-init-db]::
53 Creates an empty git object database
54
55link:git-local-pull.html[git-local-pull]::
56 Duplicates another GIT repository on a local system
57
58link:git-merge-base.html[git-merge-base]::
59 Finds as good a common ancestor as possible for a merge
60
61link:git-merge-one-file-script.html[git-merge-one-file-script]::
62 The standard helper program to use with "git-merge-cache"
63
64link:git-mktag.html[git-mktag]::
65 Creates a tag object
66
67link:git-prune-script.html[git-prune-script]::
68 Prunes all unreachable objects from the object database
69
70link:git-pull-script.html[git-pull-script]::
71 Script used by Linus to pull and merge a remote repository
72
73link:git-read-tree.html[git-read-tree]::
74 Reads tree information into the directory cache
75
76link:git-resolve-script.html[git-resolve-script]::
77 Script used to merge two trees
78
79link:git-rpull.html[git-rpull]::
80 Pulls from a remote repository over ssh connection
81
82link:git-tag-script.html[git-tag-script]::
83 An example script to create a tag object signed with GPG
84
85link:git-update-cache.html[git-update-cache]::
86 Modifies the index or directory cache
87
88link:git-write-blob.html[git-write-blob]::
89 Creates a blob from a file
90
91link:git-write-tree.html[git-write-tree]::
92 Creates a tree from the current cache
93
94Interrogation commands
95~~~~~~~~~~~~~~~~~~~~~~
96link:git-cat-file.html[git-cat-file]::
97 Provide content or type information for repository objects
98
99link:git-check-files.html[git-check-files]::
100 Verify a list of files are up-to-date
101
102link:git-diff-cache.html[git-diff-cache]::
103 Compares content and mode of blobs between the cache and repository
104
105link:git-diff-files.html[git-diff-files]::
106 Compares files in the working tree and the cache
107
108link:git-diff-tree.html[git-diff-tree]::
109 Compares the content and mode of blobs found via two tree objects
110
111link:git-diff-tree-helper.html[git-diff-tree-helper]::
112 Generates patch format output for git-diff-*
113
114link:git-export.html[git-export]::
115 Exports each commit and a diff against each of its parents
116
117link:git-fsck-cache.html[git-fsck-cache]::
118 Verifies the connectivity and validity of the objects in the database
119
120link:git-ls-files.html[git-ls-files]::
121 Information about files in the cache/working directory
122
123link:git-ls-tree.html[git-ls-tree]::
124 Displays a tree object in human readable form
125
126link:git-merge-cache.html[git-merge-cache]::
127 Runs a merge for files needing merging
128
129link:git-rev-list.html[git-rev-list]::
130 Lists commit objects in reverse chronological order
131
132link:git-rev-tree.html[git-rev-tree]::
133 Provides the revision tree for one or more commits
134
135link:git-rpush.html[git-rpush]::
136 Helper "server-side" program used by git-rpull
137
138link:git-tar-tree.html[git-tar-tree]::
139 Creates a tar archive of the files in the named tree
140
141link:git-unpack-file.html[git-unpack-file]::
142 Creates a temporary file with a blob's contents
143
144The interrogate commands may create files - and you can force them to
145touch the working file set - but in general they don't
146
147
148Terminology
149-----------
150see README for description
151
152Identifier 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
181Terminology
182-----------
183Each 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
197Environment Variables
198---------------------
199Various 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
213Author
214------
215Written by Linus Torvalds <torvalds@osdl.org>
216
217Documentation
218--------------
219Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
220
221GIT
222---
223Part of the link:git.html[git] suite
224