]>
Commit | Line | Data |
---|---|---|
7984eabe | 1 | git(7) |
2cf565c5 | 2 | ====== |
2cf565c5 DG |
3 | |
4 | NAME | |
5 | ---- | |
6 | git - the stupid content tracker | |
7 | ||
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
cb22bc44 | 11 | 'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [--help] COMMAND [ARGS] |
2cf565c5 DG |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
23091e95 BF |
15 | Git is a fast, scalable, distributed revision control system with an |
16 | unusually rich command set that provides both high-level operations | |
17 | and full access to internals. | |
18 | ||
19 | See this link:tutorial.html[tutorial] to get started, then see | |
20 | link:everyday.html[Everyday Git] for a useful minimum set of commands, and | |
21 | "man git-commandname" for documentation of each command. CVS users may | |
22 | also want to read link:cvs-migration.html[CVS migration]. | |
cb22bc44 | 23 | |
4514ad4f PB |
24 | The COMMAND is either a name of a Git command (see below) or an alias |
25 | as defined in the configuration file (see gitlink:git-repo-config[1]). | |
26 | ||
cb22bc44 AE |
27 | OPTIONS |
28 | ------- | |
29 | --version:: | |
a87cd02c | 30 | Prints the git suite version that the 'git' program came from. |
cb22bc44 AE |
31 | |
32 | --help:: | |
a87cd02c FK |
33 | Prints the synopsis and a list of the most commonly used |
34 | commands. If a git command is named this option will bring up | |
35 | the man-page for that command. If the option '--all' or '-a' is | |
36 | given then all available commands are printed. | |
cb22bc44 AE |
37 | |
38 | --exec-path:: | |
a87cd02c | 39 | Path to wherever your core git programs are installed. |
cb22bc44 AE |
40 | This can also be controlled by setting the GIT_EXEC_PATH |
41 | environment variable. If no path is given 'git' will print | |
42 | the current setting and then exit. | |
43 | ||
9755afbd | 44 | |
23091e95 BF |
45 | FURTHER DOCUMENTATION |
46 | --------------------- | |
9755afbd | 47 | |
23091e95 BF |
48 | See the references above to get started using git. The following is |
49 | probably more detail than necessary for a first-time user. | |
8db9307c | 50 | |
23091e95 BF |
51 | The <<Discussion,Discussion>> section below and the |
52 | link:core-tutorial.html[Core tutorial] both provide introductions to the | |
53 | underlying git architecture. | |
e6fc2346 | 54 | |
23091e95 BF |
55 | See also the link:howto-index.html[howto] documents for some useful |
56 | examples. | |
9755afbd | 57 | |
23091e95 BF |
58 | GIT COMMANDS |
59 | ------------ | |
9755afbd | 60 | |
23091e95 BF |
61 | We divide git into high level ("porcelain") commands and low level |
62 | ("plumbing") commands. | |
8b15e2fb | 63 | |
23091e95 BF |
64 | Low-level commands (plumbing) |
65 | ----------------------------- | |
e6fc2346 | 66 | |
23091e95 BF |
67 | Although git includes its |
68 | own porcelain layer, its low-level commands are sufficient to support | |
69 | development of alternative porcelains. Developers of such porcelains | |
70 | might start by reading about gitlink:git-update-index[1] and | |
71 | gitlink:git-read-tree[1]. | |
2cf565c5 | 72 | |
23091e95 BF |
73 | We divide the low-level commands into commands that manipulate objects (in |
74 | the repository, index, and working tree), commands that interrogate and | |
75 | compare objects, and commands that move objects and references between | |
76 | repositories. | |
204ee6a9 | 77 | |
2cf565c5 DG |
78 | Manipulation commands |
79 | ~~~~~~~~~~~~~~~~~~~~~ | |
a7154e91 | 80 | gitlink:git-apply[1]:: |
f85a4191 JH |
81 | Reads a "diff -up1" or git generated patch file and |
82 | applies it to the working tree. | |
83 | ||
a7154e91 | 84 | gitlink:git-checkout-index[1]:: |
2fa090b6 | 85 | Copy files from the index to the working tree. |
2cf565c5 | 86 | |
a7154e91 | 87 | gitlink:git-commit-tree[1]:: |
2fa090b6 | 88 | Creates a new commit object. |
2cf565c5 | 89 | |
a7154e91 | 90 | gitlink:git-hash-object[1]:: |
f85a4191 JH |
91 | Computes the object ID from a file. |
92 | ||
a52e4ef8 | 93 | gitlink:git-index-pack[1]:: |
2fa090b6 | 94 | Build pack idx file for an existing packed archive. |
9cf6d335 | 95 | |
a7154e91 | 96 | gitlink:git-init-db[1]:: |
2fa090b6 JH |
97 | Creates an empty git object database, or reinitialize an |
98 | existing one. | |
2cf565c5 | 99 | |
a7154e91 | 100 | gitlink:git-merge-index[1]:: |
2fa090b6 | 101 | Runs a merge for files needing merging. |
2cf565c5 | 102 | |
a7154e91 | 103 | gitlink:git-mktag[1]:: |
2fa090b6 | 104 | Creates a tag object. |
2cf565c5 | 105 | |
c16e30c0 JH |
106 | gitlink:git-mktree[1]:: |
107 | Build a tree-object from ls-tree formatted text. | |
108 | ||
a7154e91 | 109 | gitlink:git-pack-objects[1]:: |
f85a4191 JH |
110 | Creates a packed archive of objects. |
111 | ||
a7154e91 | 112 | gitlink:git-prune-packed[1]:: |
f85a4191 JH |
113 | Remove extra objects that are already in pack files. |
114 | ||
a7154e91 | 115 | gitlink:git-read-tree[1]:: |
2fa090b6 | 116 | Reads tree information into the index. |
2cf565c5 | 117 | |
ee72aeaf JS |
118 | gitlink:git-repo-config[1]:: |
119 | Get and set options in .git/config. | |
120 | ||
a7154e91 | 121 | gitlink:git-unpack-objects[1]:: |
f85a4191 JH |
122 | Unpacks objects out of a packed archive. |
123 | ||
a7154e91 | 124 | gitlink:git-update-index[1]:: |
2fa090b6 | 125 | Registers files in the working tree to the index. |
2cf565c5 | 126 | |
a7154e91 | 127 | gitlink:git-write-tree[1]:: |
2fa090b6 | 128 | Creates a tree from the index. |
2cf565c5 | 129 | |
e31bb3bb | 130 | |
2cf565c5 DG |
131 | Interrogation commands |
132 | ~~~~~~~~~~~~~~~~~~~~~~ | |
f85a4191 | 133 | |
a7154e91 | 134 | gitlink:git-cat-file[1]:: |
2fa090b6 | 135 | Provide content or type/size information for repository objects. |
2cf565c5 | 136 | |
c06818e2 JH |
137 | gitlink:git-describe[1]:: |
138 | Show the most recent tag that is reachable from a commit. | |
139 | ||
a7154e91 | 140 | gitlink:git-diff-index[1]:: |
2fa090b6 | 141 | Compares content and mode of blobs between the index and repository. |
2cf565c5 | 142 | |
a7154e91 | 143 | gitlink:git-diff-files[1]:: |
2fa090b6 | 144 | Compares files in the working tree and the index. |
2cf565c5 | 145 | |
a7154e91 | 146 | gitlink:git-diff-stages[1]:: |
2fa090b6 | 147 | Compares two "merge stages" in the index. |
83db04ff | 148 | |
a7154e91 | 149 | gitlink:git-diff-tree[1]:: |
2fa090b6 | 150 | Compares the content and mode of blobs found via two tree objects. |
f85a4191 | 151 | |
a7154e91 | 152 | gitlink:git-fsck-objects[1]:: |
2fa090b6 | 153 | Verifies the connectivity and validity of the objects in the database. |
2cf565c5 | 154 | |
a7154e91 | 155 | gitlink:git-ls-files[1]:: |
2fa090b6 | 156 | Information about files in the index and the working tree. |
2cf565c5 | 157 | |
a7154e91 | 158 | gitlink:git-ls-tree[1]:: |
2fa090b6 | 159 | Displays a tree object in human readable form. |
2cf565c5 | 160 | |
a7154e91 | 161 | gitlink:git-merge-base[1]:: |
2fa090b6 | 162 | Finds as good common ancestors as possible for a merge. |
2cf565c5 | 163 | |
a60d2d8f | 164 | gitlink:git-name-rev[1]:: |
2fa090b6 | 165 | Find symbolic names for given revs. |
a60d2d8f | 166 | |
76cead39 JH |
167 | gitlink:git-pack-redundant[1]:: |
168 | Find redundant pack files. | |
169 | ||
a7154e91 | 170 | gitlink:git-rev-list[1]:: |
2fa090b6 | 171 | Lists commit objects in reverse chronological order. |
2cf565c5 | 172 | |
a7154e91 | 173 | gitlink:git-show-index[1]:: |
f85a4191 JH |
174 | Displays contents of a pack idx file. |
175 | ||
a7154e91 | 176 | gitlink:git-tar-tree[1]:: |
2fa090b6 | 177 | Creates a tar archive of the files in the named tree object. |
2cf565c5 | 178 | |
a7154e91 | 179 | gitlink:git-unpack-file[1]:: |
2fa090b6 | 180 | Creates a temporary file with a blob's contents. |
2cf565c5 | 181 | |
a7154e91 | 182 | gitlink:git-var[1]:: |
2fa090b6 | 183 | Displays a git logical variable. |
aed022ab | 184 | |
a7154e91 | 185 | gitlink:git-verify-pack[1]:: |
2fa090b6 | 186 | Validates packed git archive files. |
f9253394 | 187 | |
2fa090b6 JH |
188 | In general, the interrogate commands do not touch the files in |
189 | the working tree. | |
2cf565c5 DG |
190 | |
191 | ||
0c04094b JH |
192 | Synching repositories |
193 | ~~~~~~~~~~~~~~~~~~~~~ | |
194 | ||
a7154e91 | 195 | gitlink:git-fetch-pack[1]:: |
2fa090b6 JH |
196 | Updates from a remote repository (engine for ssh and |
197 | local transport). | |
f85a4191 | 198 | |
a7154e91 | 199 | gitlink:git-http-fetch[1]:: |
2fa090b6 JH |
200 | Downloads a remote git repository via HTTP by walking |
201 | commit chain. | |
204ee6a9 | 202 | |
a7154e91 | 203 | gitlink:git-local-fetch[1]:: |
2fa090b6 JH |
204 | Duplicates another git repository on a local system by |
205 | walking commit chain. | |
204ee6a9 | 206 | |
a7154e91 | 207 | gitlink:git-peek-remote[1]:: |
2fa090b6 JH |
208 | Lists references on a remote repository using |
209 | upload-pack protocol (engine for ssh and local | |
210 | transport). | |
2f2de9b4 | 211 | |
a7154e91 | 212 | gitlink:git-receive-pack[1]:: |
2f2de9b4 JH |
213 | Invoked by 'git-send-pack' to receive what is pushed to it. |
214 | ||
a7154e91 | 215 | gitlink:git-send-pack[1]:: |
f85a4191 | 216 | Pushes to a remote repository, intelligently. |
2f2de9b4 | 217 | |
76cead39 JH |
218 | gitlink:git-http-push[1]:: |
219 | Push missing objects using HTTP/DAV. | |
220 | ||
d43367af PB |
221 | gitlink:git-shell[1]:: |
222 | Restricted shell for GIT-only SSH access. | |
223 | ||
a7154e91 | 224 | gitlink:git-ssh-fetch[1]:: |
2fa090b6 JH |
225 | Pulls from a remote repository over ssh connection by |
226 | walking commit chain. | |
508e67ab | 227 | |
a7154e91 | 228 | gitlink:git-ssh-upload[1]:: |
2fa090b6 | 229 | Helper "server-side" program used by git-ssh-fetch. |
2f2de9b4 | 230 | |
a7154e91 | 231 | gitlink:git-update-server-info[1]:: |
61e3ef36 JH |
232 | Updates auxiliary information on a dumb server to help |
233 | clients discover references and packs on it. | |
234 | ||
a7154e91 | 235 | gitlink:git-upload-pack[1]:: |
efc7fa53 | 236 | Invoked by 'git-fetch-pack' to push |
f85a4191 JH |
237 | what are asked for. |
238 | ||
34925d35 JH |
239 | gitlink:git-upload-tar[1]:: |
240 | Invoked by 'git-tar-tree --remote' to return the tar | |
241 | archive the other end asked for. | |
242 | ||
2f2de9b4 | 243 | |
23091e95 BF |
244 | High-level commands (porcelain) |
245 | ------------------------------- | |
246 | ||
247 | We separate the porcelain commands into the main commands and some | |
248 | ancillary user utilities. | |
249 | ||
250 | Main porcelain commands | |
251 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
905197de | 252 | |
a7154e91 | 253 | gitlink:git-add[1]:: |
2fa090b6 | 254 | Add paths to the index. |
905197de | 255 | |
8548ea8d PB |
256 | gitlink:git-am[1]:: |
257 | Apply patches from a mailbox, but cooler. | |
258 | ||
a7154e91 | 259 | gitlink:git-applymbox[1]:: |
2fa090b6 | 260 | Apply patches from a mailbox, original version by Linus. |
f85a4191 | 261 | |
a7154e91 | 262 | gitlink:git-bisect[1]:: |
2fa090b6 | 263 | Find the change that introduced a bug by binary search. |
f85a4191 | 264 | |
a7154e91 | 265 | gitlink:git-branch[1]:: |
905197de JH |
266 | Create and Show branches. |
267 | ||
a7154e91 | 268 | gitlink:git-checkout[1]:: |
452ce291 JH |
269 | Checkout and switch to a branch. |
270 | ||
a7154e91 | 271 | gitlink:git-cherry-pick[1]:: |
f85a4191 | 272 | Cherry-pick the effect of an existing commit. |
3f971fc4 | 273 | |
c16e30c0 JH |
274 | gitlink:git-clean[1]:: |
275 | Remove untracked files from the working tree. | |
276 | ||
a7154e91 | 277 | gitlink:git-clone[1]:: |
f85a4191 | 278 | Clones a repository into a new directory. |
3f971fc4 | 279 | |
a7154e91 | 280 | gitlink:git-commit[1]:: |
f85a4191 | 281 | Record changes to the repository. |
3f971fc4 | 282 | |
a7154e91 | 283 | gitlink:git-diff[1]:: |
2aba319a | 284 | Show changes between commits, commit and working tree, etc. |
35ef3a4c | 285 | |
a7154e91 | 286 | gitlink:git-fetch[1]:: |
62033318 JH |
287 | Download from a remote repository via various protocols. |
288 | ||
a7154e91 | 289 | gitlink:git-format-patch[1]:: |
2aba319a | 290 | Prepare patches for e-mail submission. |
35ef3a4c | 291 | |
a7154e91 | 292 | gitlink:git-grep[1]:: |
2fa090b6 | 293 | Print lines matching a pattern. |
2aba319a | 294 | |
a7154e91 | 295 | gitlink:git-log[1]:: |
f85a4191 | 296 | Shows commit logs. |
62033318 | 297 | |
a7154e91 | 298 | gitlink:git-ls-remote[1]:: |
f85a4191 | 299 | Shows references in a remote or local repository. |
ab9b3138 | 300 | |
a7154e91 | 301 | gitlink:git-merge[1]:: |
0f69be53 JH |
302 | Grand unified merge driver. |
303 | ||
8548ea8d PB |
304 | gitlink:git-mv[1]:: |
305 | Move or rename a file, a directory, or a symlink. | |
306 | ||
a7154e91 | 307 | gitlink:git-pull[1]:: |
f85a4191 JH |
308 | Fetch from and merge with a remote repository. |
309 | ||
a7154e91 | 310 | gitlink:git-push[1]:: |
ab9b3138 JH |
311 | Update remote refs along with associated objects. |
312 | ||
a7154e91 | 313 | gitlink:git-rebase[1]:: |
2fa090b6 | 314 | Rebase local commits to the updated upstream head. |
62033318 | 315 | |
a7154e91 | 316 | gitlink:git-repack[1]:: |
e31bb3bb JH |
317 | Pack unpacked objects in a repository. |
318 | ||
8389b52b JH |
319 | gitlink:git-rerere[1]:: |
320 | Reuse recorded resolution of conflicted merges. | |
321 | ||
a7154e91 | 322 | gitlink:git-reset[1]:: |
452ce291 JH |
323 | Reset current HEAD to the specified state. |
324 | ||
a7154e91 | 325 | gitlink:git-resolve[1]:: |
f85a4191 | 326 | Merge two commits. |
83db04ff | 327 | |
a7154e91 | 328 | gitlink:git-revert[1]:: |
f85a4191 JH |
329 | Revert an existing commit. |
330 | ||
c16e30c0 JH |
331 | gitlink:git-rm[1]:: |
332 | Remove files from the working tree and from the index. | |
333 | ||
a7154e91 | 334 | gitlink:git-shortlog[1]:: |
f85a4191 JH |
335 | Summarizes 'git log' output. |
336 | ||
55258b5c JL |
337 | gitlink:git-show[1]:: |
338 | Show one commit log and its diff. | |
339 | ||
a7154e91 | 340 | gitlink:git-show-branch[1]:: |
f85a4191 JH |
341 | Show branches and their commits. |
342 | ||
a7154e91 | 343 | gitlink:git-status[1]:: |
f85a4191 | 344 | Shows the working tree status. |
83db04ff | 345 | |
a7154e91 | 346 | gitlink:git-verify-tag[1]:: |
905197de JH |
347 | Check the GPG signature of tag. |
348 | ||
a7154e91 | 349 | gitlink:git-whatchanged[1]:: |
f85a4191 JH |
350 | Shows commit logs and differences they introduce. |
351 | ||
e31bb3bb | 352 | |
90933efb | 353 | Ancillary Commands |
23091e95 | 354 | ~~~~~~~~~~~~~~~~~~ |
2f2de9b4 JH |
355 | Manipulators: |
356 | ||
a7154e91 | 357 | gitlink:git-applypatch[1]:: |
f85a4191 | 358 | Apply one patch extracted from an e-mail. |
905197de | 359 | |
a7154e91 | 360 | gitlink:git-archimport[1]:: |
5077fa9c JH |
361 | Import an arch repository into git. |
362 | ||
a7154e91 | 363 | gitlink:git-convert-objects[1]:: |
2fa090b6 | 364 | Converts old-style git repository. |
2f2de9b4 | 365 | |
a7154e91 | 366 | gitlink:git-cvsimport[1]:: |
f85a4191 JH |
367 | Salvage your data out of another SCM people love to hate. |
368 | ||
76cead39 JH |
369 | gitlink:git-cvsexportcommit[1]:: |
370 | Export a single commit to a CVS checkout. | |
371 | ||
c16e30c0 JH |
372 | gitlink:git-cvsserver[1]:: |
373 | A CVS server emulator for git. | |
374 | ||
0086e2c8 | 375 | gitlink:git-lost-found[1]:: |
04e7ca1a JH |
376 | Recover lost refs that luckily have not yet been pruned. |
377 | ||
a7154e91 | 378 | gitlink:git-merge-one-file[1]:: |
2fa090b6 | 379 | The standard helper program to use with `git-merge-index`. |
204ee6a9 | 380 | |
a7154e91 | 381 | gitlink:git-prune[1]:: |
2fa090b6 | 382 | Prunes all unreachable objects from the object database. |
204ee6a9 | 383 | |
34925d35 JH |
384 | gitlink:git-quiltimport[1]:: |
385 | Applies a quilt patchset onto the current branch. | |
386 | ||
a7154e91 | 387 | gitlink:git-relink[1]:: |
f85a4191 JH |
388 | Hardlink common objects in local repositories. |
389 | ||
8548ea8d PB |
390 | gitlink:git-svnimport[1]:: |
391 | Import a SVN repository into git. | |
392 | ||
a7154e91 | 393 | gitlink:git-sh-setup[1]:: |
f85a4191 JH |
394 | Common git shell script setup code. |
395 | ||
a60d2d8f | 396 | gitlink:git-symbolic-ref[1]:: |
2fa090b6 | 397 | Read and modify symbolic refs. |
a60d2d8f | 398 | |
a7154e91 | 399 | gitlink:git-tag[1]:: |
2fa090b6 | 400 | An example script to create a tag object signed with GPG. |
204ee6a9 | 401 | |
8548ea8d PB |
402 | gitlink:git-update-ref[1]:: |
403 | Update the object name stored in a ref safely. | |
404 | ||
204ee6a9 | 405 | |
90933efb | 406 | Interrogators: |
204ee6a9 | 407 | |
8f2b72a9 JF |
408 | gitlink:git-annotate[1]:: |
409 | Annotate file lines with commit info. | |
410 | ||
411 | gitlink:git-blame[1]:: | |
412 | Blame file lines on commits. | |
413 | ||
8548ea8d PB |
414 | gitlink:git-check-ref-format[1]:: |
415 | Make sure ref name is well formed. | |
416 | ||
a7154e91 | 417 | gitlink:git-cherry[1]:: |
f85a4191 | 418 | Find commits not merged upstream. |
905197de | 419 | |
a7154e91 | 420 | gitlink:git-count-objects[1]:: |
905197de JH |
421 | Count unpacked number of objects and their disk consumption. |
422 | ||
a7154e91 | 423 | gitlink:git-daemon[1]:: |
72e9340c | 424 | A really simple server for git repositories. |
5077fa9c | 425 | |
c16e30c0 JH |
426 | gitlink:git-fmt-merge-msg[1]:: |
427 | Produce a merge commit message. | |
428 | ||
a7154e91 | 429 | gitlink:git-get-tar-commit-id[1]:: |
5077fa9c JH |
430 | Extract commit ID from an archive created using git-tar-tree. |
431 | ||
c16e30c0 JH |
432 | gitlink:git-imap-send[1]:: |
433 | Dump a mailbox from stdin into an imap folder. | |
434 | ||
a7154e91 | 435 | gitlink:git-mailinfo[1]:: |
2fa090b6 JH |
436 | Extracts patch and authorship information from a single |
437 | e-mail message, optionally transliterating the commit | |
438 | message into utf-8. | |
f85a4191 | 439 | |
a7154e91 | 440 | gitlink:git-mailsplit[1]:: |
2fa090b6 JH |
441 | A stupid program to split UNIX mbox format mailbox into |
442 | individual pieces of e-mail. | |
f85a4191 | 443 | |
c16e30c0 JH |
444 | gitlink:git-merge-tree[1]:: |
445 | Show three-way merge without touching index. | |
446 | ||
a7154e91 | 447 | gitlink:git-patch-id[1]:: |
f85a4191 | 448 | Compute unique ID for a patch. |
204ee6a9 | 449 | |
a7154e91 | 450 | gitlink:git-parse-remote[1]:: |
2fa090b6 | 451 | Routines to help parsing `$GIT_DIR/remotes/` files. |
5077fa9c | 452 | |
a7154e91 | 453 | gitlink:git-request-pull[1]:: |
215a7ad1 | 454 | git-request-pull. |
5077fa9c | 455 | |
a7154e91 | 456 | gitlink:git-rev-parse[1]:: |
5077fa9c JH |
457 | Pick out and massage parameters. |
458 | ||
a7154e91 | 459 | gitlink:git-send-email[1]:: |
83db04ff | 460 | Send patch e-mails out of "format-patch --mbox" output. |
204ee6a9 | 461 | |
c1fe2fe4 | 462 | gitlink:git-symbolic-ref[1]:: |
8548ea8d PB |
463 | Read and modify symbolic refs. |
464 | ||
a7154e91 | 465 | gitlink:git-stripspace[1]:: |
35ef3a4c | 466 | Filter out empty lines. |
7fc9d69f | 467 | |
7fc9d69f | 468 | |
35ef3a4c JH |
469 | Commands not yet documented |
470 | --------------------------- | |
7fc9d69f | 471 | |
a7154e91 | 472 | gitlink:gitk[1]:: |
2fa090b6 | 473 | The gitk repository browser. |
7fc9d69f JH |
474 | |
475 | ||
5773c9f2 JH |
476 | Configuration Mechanism |
477 | ----------------------- | |
478 | ||
2fa090b6 | 479 | Starting from 0.99.9 (actually mid 0.99.8.GIT), `.git/config` file |
5773c9f2 | 480 | is used to hold per-repository configuration options. It is a |
addf88e4 | 481 | simple text file modeled after `.ini` format familiar to some |
5773c9f2 JH |
482 | people. Here is an example: |
483 | ||
484 | ------------ | |
485 | # | |
2fa090b6 | 486 | # A '#' or ';' character indicates a comment. |
5773c9f2 JH |
487 | # |
488 | ||
489 | ; core variables | |
490 | [core] | |
491 | ; Don't trust file modes | |
492 | filemode = false | |
493 | ||
494 | ; user identity | |
495 | [user] | |
496 | name = "Junio C Hamano" | |
497 | email = "junkio@twinsun.com" | |
498 | ||
499 | ------------ | |
500 | ||
501 | Various commands read from the configuration file and adjust | |
502 | their operation accordingly. | |
503 | ||
504 | ||
6c84e2e0 | 505 | Identifier Terminology |
2cf565c5 DG |
506 | ---------------------- |
507 | <object>:: | |
2fa090b6 | 508 | Indicates the object name for any type of object. |
2cf565c5 DG |
509 | |
510 | <blob>:: | |
2fa090b6 | 511 | Indicates a blob object name. |
2cf565c5 DG |
512 | |
513 | <tree>:: | |
2fa090b6 | 514 | Indicates a tree object name. |
2cf565c5 DG |
515 | |
516 | <commit>:: | |
2fa090b6 | 517 | Indicates a commit object name. |
2cf565c5 DG |
518 | |
519 | <tree-ish>:: | |
2fa090b6 | 520 | Indicates a tree, commit or tag object name. A |
6c84e2e0 DG |
521 | command that takes a <tree-ish> argument ultimately wants to |
522 | operate on a <tree> object but automatically dereferences | |
523 | <commit> and <tag> objects that point at a <tree>. | |
2cf565c5 DG |
524 | |
525 | <type>:: | |
526 | Indicates that an object type is required. | |
2fa090b6 | 527 | Currently one of: `blob`, `tree`, `commit`, or `tag`. |
2cf565c5 DG |
528 | |
529 | <file>:: | |
2fa090b6 JH |
530 | Indicates a filename - almost always relative to the |
531 | root of the tree structure `GIT_INDEX_FILE` describes. | |
2cf565c5 | 532 | |
c1bdacf9 DG |
533 | Symbolic Identifiers |
534 | -------------------- | |
90933efb | 535 | Any git command accepting any <object> can also use the following |
6c84e2e0 | 536 | symbolic notation: |
c1bdacf9 DG |
537 | |
538 | HEAD:: | |
2fa090b6 JH |
539 | indicates the head of the current branch (i.e. the |
540 | contents of `$GIT_DIR/HEAD`). | |
541 | ||
c1bdacf9 | 542 | <tag>:: |
2fa090b6 JH |
543 | a valid tag 'name' |
544 | (i.e. the contents of `$GIT_DIR/refs/tags/<tag>`). | |
545 | ||
c1bdacf9 | 546 | <head>:: |
2fa090b6 JH |
547 | a valid head 'name' |
548 | (i.e. the contents of `$GIT_DIR/refs/heads/<head>`). | |
549 | ||
c1bdacf9 DG |
550 | |
551 | File/Directory Structure | |
552 | ------------------------ | |
c1bdacf9 | 553 | |
a1d4aa74 | 554 | Please see link:repository-layout.html[repository layout] document. |
c1bdacf9 | 555 | |
6250ad1e JL |
556 | Read link:hooks.html[hooks] for more details about each hook. |
557 | ||
c1bdacf9 | 558 | Higher level SCMs may provide and manage additional information in the |
2fa090b6 | 559 | `$GIT_DIR`. |
c1bdacf9 | 560 | |
a1d4aa74 | 561 | |
2cf565c5 DG |
562 | Terminology |
563 | ----------- | |
1bff6490 | 564 | Please see link:glossary.html[glossary] document. |
2cf565c5 DG |
565 | |
566 | ||
567 | Environment Variables | |
568 | --------------------- | |
569 | Various git commands use the following environment variables: | |
570 | ||
c1bdacf9 DG |
571 | The git Repository |
572 | ~~~~~~~~~~~~~~~~~~ | |
573 | These environment variables apply to 'all' core git commands. Nb: it | |
574 | is worth noting that they may be used/overridden by SCMS sitting above | |
2fa090b6 | 575 | git so take care if using Cogito etc. |
c1bdacf9 DG |
576 | |
577 | 'GIT_INDEX_FILE':: | |
578 | This environment allows the specification of an alternate | |
5f3aa197 LS |
579 | index file. If not specified, the default of `$GIT_DIR/index` |
580 | is used. | |
c1bdacf9 DG |
581 | |
582 | 'GIT_OBJECT_DIRECTORY':: | |
583 | If the object storage directory is specified via this | |
584 | environment variable then the sha1 directories are created | |
585 | underneath - otherwise the default `$GIT_DIR/objects` | |
586 | directory is used. | |
587 | ||
588 | 'GIT_ALTERNATE_OBJECT_DIRECTORIES':: | |
589 | Due to the immutable nature of git objects, old objects can be | |
590 | archived into shared, read-only directories. This variable | |
90933efb | 591 | specifies a ":" separated list of git object directories which |
c1bdacf9 DG |
592 | can be used to search for git objects. New objects will not be |
593 | written to these directories. | |
594 | ||
595 | 'GIT_DIR':: | |
2fa090b6 JH |
596 | If the 'GIT_DIR' environment variable is set then it |
597 | specifies a path to use instead of the default `.git` | |
598 | for the base of the repository. | |
c1bdacf9 DG |
599 | |
600 | git Commits | |
601 | ~~~~~~~~~~~ | |
602 | 'GIT_AUTHOR_NAME':: | |
603 | 'GIT_AUTHOR_EMAIL':: | |
604 | 'GIT_AUTHOR_DATE':: | |
605 | 'GIT_COMMITTER_NAME':: | |
606 | 'GIT_COMMITTER_EMAIL':: | |
a7154e91 | 607 | see gitlink:git-commit-tree[1] |
c1bdacf9 DG |
608 | |
609 | git Diffs | |
610 | ~~~~~~~~~ | |
d81ed1b5 JH |
611 | 'GIT_DIFF_OPTS':: |
612 | 'GIT_EXTERNAL_DIFF':: | |
c1bdacf9 | 613 | see the "generating patches" section in : |
a7154e91 SV |
614 | gitlink:git-diff-index[1]; |
615 | gitlink:git-diff-files[1]; | |
616 | gitlink:git-diff-tree[1] | |
2cf565c5 | 617 | |
575ba9d6 ML |
618 | other |
619 | ~~~~~ | |
620 | 'GIT_TRACE':: | |
621 | If this variable is set git will print `trace:` messages on | |
622 | stderr telling about alias expansion, built-in command | |
623 | execution and external command execution. | |
624 | ||
8db9307c JH |
625 | Discussion[[Discussion]] |
626 | ------------------------ | |
941c9449 | 627 | include::README[] |
6c84e2e0 | 628 | |
cb22bc44 AE |
629 | Authors |
630 | ------- | |
9755afbd JH |
631 | * git's founding father is Linus Torvalds <torvalds@osdl.org>. |
632 | * The current git nurse is Junio C Hamano <junkio@cox.net>. | |
633 | * The git potty was written by Andres Ericsson <ae@op5.se>. | |
634 | * General upbringing is handled by the git-list <git@vger.kernel.org>. | |
2cf565c5 DG |
635 | |
636 | Documentation | |
637 | -------------- | |
9755afbd JH |
638 | The documentation for git suite was started by David Greaves |
639 | <david@dgreaves.com>, and later enhanced greatly by the | |
640 | contributors on the git-list <git@vger.kernel.org>. | |
2cf565c5 DG |
641 | |
642 | GIT | |
643 | --- | |
a7154e91 | 644 | Part of the gitlink:git[7] suite |
2cf565c5 | 645 |