6 git - the stupid content tracker
12 'git' [--version] [--help] [-C <path>] [-c <name>=<value>]
13 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
14 [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
15 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
20 Git is a fast, scalable, distributed revision control system with an
21 unusually rich command set that provides both high-level operations
22 and full access to internals.
24 See linkgit:gittutorial[7] to get started, then see
25 linkgit:giteveryday[7] for a useful minimum set of
26 commands. The link:user-manual.html[Git User's Manual] has a more
27 in-depth introduction.
29 After you mastered the basic concepts, you can come back to this
30 page to learn what commands Git offers. You can learn more about
31 individual Git commands with "git help command". linkgit:gitcli[7]
32 manual page gives you an overview of the command-line command syntax.
34 Formatted and hyperlinked version of the latest Git documentation
35 can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
41 You are reading the documentation for the latest (possibly
42 unreleased) version of Git, that is available from the 'master'
43 branch of the `git.git` repository.
44 Documentation for older releases are available here:
46 * link:v2.3.8/git.html[documentation for release 2.3.8]
49 link:RelNotes/2.3.8.txt[2.3.8],
50 link:RelNotes/2.3.7.txt[2.3.7],
51 link:RelNotes/2.3.6.txt[2.3.6],
52 link:RelNotes/2.3.5.txt[2.3.5],
53 link:RelNotes/2.3.4.txt[2.3.4],
54 link:RelNotes/2.3.3.txt[2.3.3],
55 link:RelNotes/2.3.2.txt[2.3.2],
56 link:RelNotes/2.3.1.txt[2.3.1],
57 link:RelNotes/2.3.0.txt[2.3].
59 * link:v2.2.3/git.html[documentation for release 2.2.3]
62 link:RelNotes/2.2.3.txt[2.2.3],
63 link:RelNotes/2.2.2.txt[2.2.2],
64 link:RelNotes/2.2.1.txt[2.2.1],
65 link:RelNotes/2.2.0.txt[2.2].
67 * link:v2.1.4/git.html[documentation for release 2.1.4]
70 link:RelNotes/2.1.4.txt[2.1.4],
71 link:RelNotes/2.1.3.txt[2.1.3],
72 link:RelNotes/2.1.2.txt[2.1.2],
73 link:RelNotes/2.1.1.txt[2.1.1],
74 link:RelNotes/2.1.0.txt[2.1].
76 * link:v2.0.5/git.html[documentation for release 2.0.5]
79 link:RelNotes/2.0.5.txt[2.0.5],
80 link:RelNotes/2.0.4.txt[2.0.4],
81 link:RelNotes/2.0.3.txt[2.0.3],
82 link:RelNotes/2.0.2.txt[2.0.2],
83 link:RelNotes/2.0.1.txt[2.0.1],
84 link:RelNotes/2.0.0.txt[2.0.0].
86 * link:v1.9.5/git.html[documentation for release 1.9.5]
89 link:RelNotes/1.9.5.txt[1.9.5],
90 link:RelNotes/1.9.4.txt[1.9.4],
91 link:RelNotes/1.9.3.txt[1.9.3],
92 link:RelNotes/1.9.2.txt[1.9.2],
93 link:RelNotes/1.9.1.txt[1.9.1],
94 link:RelNotes/1.9.0.txt[1.9.0].
96 * link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
99 link:RelNotes/1.8.5.6.txt[1.8.5.6],
100 link:RelNotes/1.8.5.5.txt[1.8.5.5],
101 link:RelNotes/1.8.5.4.txt[1.8.5.4],
102 link:RelNotes/1.8.5.3.txt[1.8.5.3],
103 link:RelNotes/1.8.5.2.txt[1.8.5.2],
104 link:RelNotes/1.8.5.1.txt[1.8.5.1],
105 link:RelNotes/1.8.5.txt[1.8.5].
107 * link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
110 link:RelNotes/1.8.4.5.txt[1.8.4.5],
111 link:RelNotes/1.8.4.4.txt[1.8.4.4],
112 link:RelNotes/1.8.4.3.txt[1.8.4.3],
113 link:RelNotes/1.8.4.2.txt[1.8.4.2],
114 link:RelNotes/1.8.4.1.txt[1.8.4.1],
115 link:RelNotes/1.8.4.txt[1.8.4].
117 * link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
120 link:RelNotes/1.8.3.4.txt[1.8.3.4],
121 link:RelNotes/1.8.3.3.txt[1.8.3.3],
122 link:RelNotes/1.8.3.2.txt[1.8.3.2],
123 link:RelNotes/1.8.3.1.txt[1.8.3.1],
124 link:RelNotes/1.8.3.txt[1.8.3].
126 * link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
129 link:RelNotes/1.8.2.3.txt[1.8.2.3],
130 link:RelNotes/1.8.2.2.txt[1.8.2.2],
131 link:RelNotes/1.8.2.1.txt[1.8.2.1],
132 link:RelNotes/1.8.2.txt[1.8.2].
134 * link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
137 link:RelNotes/1.8.1.6.txt[1.8.1.6],
138 link:RelNotes/1.8.1.5.txt[1.8.1.5],
139 link:RelNotes/1.8.1.4.txt[1.8.1.4],
140 link:RelNotes/1.8.1.3.txt[1.8.1.3],
141 link:RelNotes/1.8.1.2.txt[1.8.1.2],
142 link:RelNotes/1.8.1.1.txt[1.8.1.1],
143 link:RelNotes/1.8.1.txt[1.8.1].
145 * link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
148 link:RelNotes/1.8.0.3.txt[1.8.0.3],
149 link:RelNotes/1.8.0.2.txt[1.8.0.2],
150 link:RelNotes/1.8.0.1.txt[1.8.0.1],
151 link:RelNotes/1.8.0.txt[1.8.0].
153 * link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
156 link:RelNotes/1.7.12.4.txt[1.7.12.4],
157 link:RelNotes/1.7.12.3.txt[1.7.12.3],
158 link:RelNotes/1.7.12.2.txt[1.7.12.2],
159 link:RelNotes/1.7.12.1.txt[1.7.12.1],
160 link:RelNotes/1.7.12.txt[1.7.12].
162 * link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
165 link:RelNotes/1.7.11.7.txt[1.7.11.7],
166 link:RelNotes/1.7.11.6.txt[1.7.11.6],
167 link:RelNotes/1.7.11.5.txt[1.7.11.5],
168 link:RelNotes/1.7.11.4.txt[1.7.11.4],
169 link:RelNotes/1.7.11.3.txt[1.7.11.3],
170 link:RelNotes/1.7.11.2.txt[1.7.11.2],
171 link:RelNotes/1.7.11.1.txt[1.7.11.1],
172 link:RelNotes/1.7.11.txt[1.7.11].
174 * link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
177 link:RelNotes/1.7.10.5.txt[1.7.10.5],
178 link:RelNotes/1.7.10.4.txt[1.7.10.4],
179 link:RelNotes/1.7.10.3.txt[1.7.10.3],
180 link:RelNotes/1.7.10.2.txt[1.7.10.2],
181 link:RelNotes/1.7.10.1.txt[1.7.10.1],
182 link:RelNotes/1.7.10.txt[1.7.10].
184 * link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
187 link:RelNotes/1.7.9.7.txt[1.7.9.7],
188 link:RelNotes/1.7.9.6.txt[1.7.9.6],
189 link:RelNotes/1.7.9.5.txt[1.7.9.5],
190 link:RelNotes/1.7.9.4.txt[1.7.9.4],
191 link:RelNotes/1.7.9.3.txt[1.7.9.3],
192 link:RelNotes/1.7.9.2.txt[1.7.9.2],
193 link:RelNotes/1.7.9.1.txt[1.7.9.1],
194 link:RelNotes/1.7.9.txt[1.7.9].
196 * link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
199 link:RelNotes/1.7.8.6.txt[1.7.8.6],
200 link:RelNotes/1.7.8.5.txt[1.7.8.5],
201 link:RelNotes/1.7.8.4.txt[1.7.8.4],
202 link:RelNotes/1.7.8.3.txt[1.7.8.3],
203 link:RelNotes/1.7.8.2.txt[1.7.8.2],
204 link:RelNotes/1.7.8.1.txt[1.7.8.1],
205 link:RelNotes/1.7.8.txt[1.7.8].
207 * link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
210 link:RelNotes/1.7.7.7.txt[1.7.7.7],
211 link:RelNotes/1.7.7.6.txt[1.7.7.6],
212 link:RelNotes/1.7.7.5.txt[1.7.7.5],
213 link:RelNotes/1.7.7.4.txt[1.7.7.4],
214 link:RelNotes/1.7.7.3.txt[1.7.7.3],
215 link:RelNotes/1.7.7.2.txt[1.7.7.2],
216 link:RelNotes/1.7.7.1.txt[1.7.7.1],
217 link:RelNotes/1.7.7.txt[1.7.7].
219 * link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
222 link:RelNotes/1.7.6.6.txt[1.7.6.6],
223 link:RelNotes/1.7.6.5.txt[1.7.6.5],
224 link:RelNotes/1.7.6.4.txt[1.7.6.4],
225 link:RelNotes/1.7.6.3.txt[1.7.6.3],
226 link:RelNotes/1.7.6.2.txt[1.7.6.2],
227 link:RelNotes/1.7.6.1.txt[1.7.6.1],
228 link:RelNotes/1.7.6.txt[1.7.6].
230 * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
233 link:RelNotes/1.7.5.4.txt[1.7.5.4],
234 link:RelNotes/1.7.5.3.txt[1.7.5.3],
235 link:RelNotes/1.7.5.2.txt[1.7.5.2],
236 link:RelNotes/1.7.5.1.txt[1.7.5.1],
237 link:RelNotes/1.7.5.txt[1.7.5].
239 * link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
242 link:RelNotes/1.7.4.5.txt[1.7.4.5],
243 link:RelNotes/1.7.4.4.txt[1.7.4.4],
244 link:RelNotes/1.7.4.3.txt[1.7.4.3],
245 link:RelNotes/1.7.4.2.txt[1.7.4.2],
246 link:RelNotes/1.7.4.1.txt[1.7.4.1],
247 link:RelNotes/1.7.4.txt[1.7.4].
249 * link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
252 link:RelNotes/1.7.3.5.txt[1.7.3.5],
253 link:RelNotes/1.7.3.4.txt[1.7.3.4],
254 link:RelNotes/1.7.3.3.txt[1.7.3.3],
255 link:RelNotes/1.7.3.2.txt[1.7.3.2],
256 link:RelNotes/1.7.3.1.txt[1.7.3.1],
257 link:RelNotes/1.7.3.txt[1.7.3].
259 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
262 link:RelNotes/1.7.2.5.txt[1.7.2.5],
263 link:RelNotes/1.7.2.4.txt[1.7.2.4],
264 link:RelNotes/1.7.2.3.txt[1.7.2.3],
265 link:RelNotes/1.7.2.2.txt[1.7.2.2],
266 link:RelNotes/1.7.2.1.txt[1.7.2.1],
267 link:RelNotes/1.7.2.txt[1.7.2].
269 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
272 link:RelNotes/1.7.1.4.txt[1.7.1.4],
273 link:RelNotes/1.7.1.3.txt[1.7.1.3],
274 link:RelNotes/1.7.1.2.txt[1.7.1.2],
275 link:RelNotes/1.7.1.1.txt[1.7.1.1],
276 link:RelNotes/1.7.1.txt[1.7.1].
278 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
281 link:RelNotes/1.7.0.9.txt[1.7.0.9],
282 link:RelNotes/1.7.0.8.txt[1.7.0.8],
283 link:RelNotes/1.7.0.7.txt[1.7.0.7],
284 link:RelNotes/1.7.0.6.txt[1.7.0.6],
285 link:RelNotes/1.7.0.5.txt[1.7.0.5],
286 link:RelNotes/1.7.0.4.txt[1.7.0.4],
287 link:RelNotes/1.7.0.3.txt[1.7.0.3],
288 link:RelNotes/1.7.0.2.txt[1.7.0.2],
289 link:RelNotes/1.7.0.1.txt[1.7.0.1],
290 link:RelNotes/1.7.0.txt[1.7.0].
292 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
295 link:RelNotes/1.6.6.3.txt[1.6.6.3],
296 link:RelNotes/1.6.6.2.txt[1.6.6.2],
297 link:RelNotes/1.6.6.1.txt[1.6.6.1],
298 link:RelNotes/1.6.6.txt[1.6.6].
300 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
303 link:RelNotes/1.6.5.9.txt[1.6.5.9],
304 link:RelNotes/1.6.5.8.txt[1.6.5.8],
305 link:RelNotes/1.6.5.7.txt[1.6.5.7],
306 link:RelNotes/1.6.5.6.txt[1.6.5.6],
307 link:RelNotes/1.6.5.5.txt[1.6.5.5],
308 link:RelNotes/1.6.5.4.txt[1.6.5.4],
309 link:RelNotes/1.6.5.3.txt[1.6.5.3],
310 link:RelNotes/1.6.5.2.txt[1.6.5.2],
311 link:RelNotes/1.6.5.1.txt[1.6.5.1],
312 link:RelNotes/1.6.5.txt[1.6.5].
314 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
317 link:RelNotes/1.6.4.5.txt[1.6.4.5],
318 link:RelNotes/1.6.4.4.txt[1.6.4.4],
319 link:RelNotes/1.6.4.3.txt[1.6.4.3],
320 link:RelNotes/1.6.4.2.txt[1.6.4.2],
321 link:RelNotes/1.6.4.1.txt[1.6.4.1],
322 link:RelNotes/1.6.4.txt[1.6.4].
324 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
327 link:RelNotes/1.6.3.4.txt[1.6.3.4],
328 link:RelNotes/1.6.3.3.txt[1.6.3.3],
329 link:RelNotes/1.6.3.2.txt[1.6.3.2],
330 link:RelNotes/1.6.3.1.txt[1.6.3.1],
331 link:RelNotes/1.6.3.txt[1.6.3].
334 link:RelNotes/1.6.2.5.txt[1.6.2.5],
335 link:RelNotes/1.6.2.4.txt[1.6.2.4],
336 link:RelNotes/1.6.2.3.txt[1.6.2.3],
337 link:RelNotes/1.6.2.2.txt[1.6.2.2],
338 link:RelNotes/1.6.2.1.txt[1.6.2.1],
339 link:RelNotes/1.6.2.txt[1.6.2].
341 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
344 link:RelNotes/1.6.1.3.txt[1.6.1.3],
345 link:RelNotes/1.6.1.2.txt[1.6.1.2],
346 link:RelNotes/1.6.1.1.txt[1.6.1.1],
347 link:RelNotes/1.6.1.txt[1.6.1].
349 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
352 link:RelNotes/1.6.0.6.txt[1.6.0.6],
353 link:RelNotes/1.6.0.5.txt[1.6.0.5],
354 link:RelNotes/1.6.0.4.txt[1.6.0.4],
355 link:RelNotes/1.6.0.3.txt[1.6.0.3],
356 link:RelNotes/1.6.0.2.txt[1.6.0.2],
357 link:RelNotes/1.6.0.1.txt[1.6.0.1],
358 link:RelNotes/1.6.0.txt[1.6.0].
360 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
363 link:RelNotes/1.5.6.6.txt[1.5.6.6],
364 link:RelNotes/1.5.6.5.txt[1.5.6.5],
365 link:RelNotes/1.5.6.4.txt[1.5.6.4],
366 link:RelNotes/1.5.6.3.txt[1.5.6.3],
367 link:RelNotes/1.5.6.2.txt[1.5.6.2],
368 link:RelNotes/1.5.6.1.txt[1.5.6.1],
369 link:RelNotes/1.5.6.txt[1.5.6].
371 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
374 link:RelNotes/1.5.5.6.txt[1.5.5.6],
375 link:RelNotes/1.5.5.5.txt[1.5.5.5],
376 link:RelNotes/1.5.5.4.txt[1.5.5.4],
377 link:RelNotes/1.5.5.3.txt[1.5.5.3],
378 link:RelNotes/1.5.5.2.txt[1.5.5.2],
379 link:RelNotes/1.5.5.1.txt[1.5.5.1],
380 link:RelNotes/1.5.5.txt[1.5.5].
382 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
385 link:RelNotes/1.5.4.7.txt[1.5.4.7],
386 link:RelNotes/1.5.4.6.txt[1.5.4.6],
387 link:RelNotes/1.5.4.5.txt[1.5.4.5],
388 link:RelNotes/1.5.4.4.txt[1.5.4.4],
389 link:RelNotes/1.5.4.3.txt[1.5.4.3],
390 link:RelNotes/1.5.4.2.txt[1.5.4.2],
391 link:RelNotes/1.5.4.1.txt[1.5.4.1],
392 link:RelNotes/1.5.4.txt[1.5.4].
394 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
397 link:RelNotes/1.5.3.8.txt[1.5.3.8],
398 link:RelNotes/1.5.3.7.txt[1.5.3.7],
399 link:RelNotes/1.5.3.6.txt[1.5.3.6],
400 link:RelNotes/1.5.3.5.txt[1.5.3.5],
401 link:RelNotes/1.5.3.4.txt[1.5.3.4],
402 link:RelNotes/1.5.3.3.txt[1.5.3.3],
403 link:RelNotes/1.5.3.2.txt[1.5.3.2],
404 link:RelNotes/1.5.3.1.txt[1.5.3.1],
405 link:RelNotes/1.5.3.txt[1.5.3].
407 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
410 link:RelNotes/1.5.2.5.txt[1.5.2.5],
411 link:RelNotes/1.5.2.4.txt[1.5.2.4],
412 link:RelNotes/1.5.2.3.txt[1.5.2.3],
413 link:RelNotes/1.5.2.2.txt[1.5.2.2],
414 link:RelNotes/1.5.2.1.txt[1.5.2.1],
415 link:RelNotes/1.5.2.txt[1.5.2].
417 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
420 link:RelNotes/1.5.1.6.txt[1.5.1.6],
421 link:RelNotes/1.5.1.5.txt[1.5.1.5],
422 link:RelNotes/1.5.1.4.txt[1.5.1.4],
423 link:RelNotes/1.5.1.3.txt[1.5.1.3],
424 link:RelNotes/1.5.1.2.txt[1.5.1.2],
425 link:RelNotes/1.5.1.1.txt[1.5.1.1],
426 link:RelNotes/1.5.1.txt[1.5.1].
428 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
431 link:RelNotes/1.5.0.7.txt[1.5.0.7],
432 link:RelNotes/1.5.0.6.txt[1.5.0.6],
433 link:RelNotes/1.5.0.5.txt[1.5.0.5],
434 link:RelNotes/1.5.0.3.txt[1.5.0.3],
435 link:RelNotes/1.5.0.2.txt[1.5.0.2],
436 link:RelNotes/1.5.0.1.txt[1.5.0.1],
437 link:RelNotes/1.5.0.txt[1.5.0].
439 * documentation for release link:v1.4.4.4/git.html[1.4.4.4],
440 link:v1.3.3/git.html[1.3.3],
441 link:v1.2.6/git.html[1.2.6],
442 link:v1.0.13/git.html[1.0.13].
451 Prints the Git suite version that the 'git' program came from.
454 Prints the synopsis and a list of the most commonly used
455 commands. If the option '--all' or '-a' is given then all
456 available commands are printed. If a Git command is named this
457 option will bring up the manual page for that command.
459 Other options are available to control how the manual page is
460 displayed. See linkgit:git-help[1] for more information,
461 because `git --help ...` is converted internally into `git
465 Run as if git was started in '<path>' instead of the current working
466 directory. When multiple `-C` options are given, each subsequent
467 non-absolute `-C <path>` is interpreted relative to the preceding `-C
470 This option affects options that expect path name like `--git-dir` and
471 `--work-tree` in that their interpretations of the path names would be
472 made relative to the working directory caused by the `-C` option. For
473 example the following invocations are equivalent:
475 git --git-dir=a.git --work-tree=b -C c status
476 git --git-dir=c/a.git --work-tree=c/b status
479 Pass a configuration parameter to the command. The value
480 given will override values from configuration files.
481 The <name> is expected in the same format as listed by
482 'git config' (subkeys separated by dots).
484 Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
485 `foo.bar` to the boolean true value (just like `[foo]bar` would in a
486 config file). Including the equals but with an empty value (like `git -c
487 foo.bar= ...`) sets `foo.bar` to the empty string.
489 --exec-path[=<path>]::
490 Path to wherever your core Git programs are installed.
491 This can also be controlled by setting the GIT_EXEC_PATH
492 environment variable. If no path is given, 'git' will print
493 the current setting and then exit.
496 Print the path, without trailing slash, where Git's HTML
497 documentation is installed and exit.
500 Print the manpath (see `man(1)`) for the man pages for
501 this version of Git and exit.
504 Print the path where the Info files documenting this
505 version of Git are installed and exit.
509 Pipe all output into 'less' (or if set, $PAGER) if standard
510 output is a terminal. This overrides the `pager.<cmd>`
511 configuration options (see the "Configuration Mechanism" section
515 Do not pipe Git output into a pager.
518 Set the path to the repository. This can also be controlled by
519 setting the GIT_DIR environment variable. It can be an absolute
520 path or relative path to current working directory.
523 Set the path to the working tree. It can be an absolute path
524 or a path relative to the current working directory.
525 This can also be controlled by setting the GIT_WORK_TREE
526 environment variable and the core.worktree configuration
527 variable (see core.worktree in linkgit:git-config[1] for a
528 more detailed discussion).
531 Set the Git namespace. See linkgit:gitnamespaces[7] for more
532 details. Equivalent to setting the `GIT_NAMESPACE` environment
536 Treat the repository as a bare repository. If GIT_DIR
537 environment is not set, it is set to the current working
540 --no-replace-objects::
541 Do not use replacement refs to replace Git objects. See
542 linkgit:git-replace[1] for more information.
544 --literal-pathspecs::
545 Treat pathspecs literally (i.e. no globbing, no pathspec magic).
546 This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
550 Add "glob" magic to all pathspec. This is equivalent to setting
551 the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
552 globbing on individual pathspecs can be done using pathspec
556 Add "literal" magic to all pathspec. This is equivalent to setting
557 the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
558 globbing on individual pathspecs can be done using pathspec
562 Add "icase" magic to all pathspec. This is equivalent to setting
563 the `GIT_ICASE_PATHSPECS` environment variable to `1`.
568 We divide Git into high level ("porcelain") commands and low level
569 ("plumbing") commands.
571 High-level commands (porcelain)
572 -------------------------------
574 We separate the porcelain commands into the main commands and some
575 ancillary user utilities.
577 Main porcelain commands
578 ~~~~~~~~~~~~~~~~~~~~~~~
580 include::cmds-mainporcelain.txt[]
586 include::cmds-ancillarymanipulators.txt[]
590 include::cmds-ancillaryinterrogators.txt[]
593 Interacting with Others
594 ~~~~~~~~~~~~~~~~~~~~~~~
596 These commands are to interact with foreign SCM and with other
597 people via patch over e-mail.
599 include::cmds-foreignscminterface.txt[]
602 Low-level commands (plumbing)
603 -----------------------------
605 Although Git includes its
606 own porcelain layer, its low-level commands are sufficient to support
607 development of alternative porcelains. Developers of such porcelains
608 might start by reading about linkgit:git-update-index[1] and
609 linkgit:git-read-tree[1].
611 The interface (input, output, set of options and the semantics)
612 to these low-level commands are meant to be a lot more stable
613 than Porcelain level commands, because these commands are
614 primarily for scripted use. The interface to Porcelain commands
615 on the other hand are subject to change in order to improve the
618 The following description divides
619 the low-level commands into commands that manipulate objects (in
620 the repository, index, and working tree), commands that interrogate and
621 compare objects, and commands that move objects and references between
625 Manipulation commands
626 ~~~~~~~~~~~~~~~~~~~~~
628 include::cmds-plumbingmanipulators.txt[]
631 Interrogation commands
632 ~~~~~~~~~~~~~~~~~~~~~~
634 include::cmds-plumbinginterrogators.txt[]
636 In general, the interrogate commands do not touch the files in
640 Synching repositories
641 ~~~~~~~~~~~~~~~~~~~~~
643 include::cmds-synchingrepositories.txt[]
645 The following are helper commands used by the above; end users
646 typically do not use them directly.
648 include::cmds-synchelpers.txt[]
651 Internal helper commands
652 ~~~~~~~~~~~~~~~~~~~~~~~~
654 These are internal helper commands used by other commands; end
655 users typically do not use them directly.
657 include::cmds-purehelpers.txt[]
660 Configuration Mechanism
661 -----------------------
663 Git uses a simple text format to store customizations that are per
664 repository and are per user. Such a configuration file may look
669 # A '#' or ';' character indicates a comment.
674 ; Don't trust file modes
679 name = "Junio C Hamano"
680 email = "gitster@pobox.com"
684 Various commands read from the configuration file and adjust
685 their operation accordingly. See linkgit:git-config[1] for a
686 list and more details about the configuration mechanism.
689 Identifier Terminology
690 ----------------------
692 Indicates the object name for any type of object.
695 Indicates a blob object name.
698 Indicates a tree object name.
701 Indicates a commit object name.
704 Indicates a tree, commit or tag object name. A
705 command that takes a <tree-ish> argument ultimately wants to
706 operate on a <tree> object but automatically dereferences
707 <commit> and <tag> objects that point at a <tree>.
710 Indicates a commit or tag object name. A
711 command that takes a <commit-ish> argument ultimately wants to
712 operate on a <commit> object but automatically dereferences
713 <tag> objects that point at a <commit>.
716 Indicates that an object type is required.
717 Currently one of: `blob`, `tree`, `commit`, or `tag`.
720 Indicates a filename - almost always relative to the
721 root of the tree structure `GIT_INDEX_FILE` describes.
725 Any Git command accepting any <object> can also use the following
729 indicates the head of the current branch.
733 (i.e. a `refs/tags/<tag>` reference).
737 (i.e. a `refs/heads/<head>` reference).
739 For a more complete list of ways to spell object names, see
740 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
743 File/Directory Structure
744 ------------------------
746 Please see the linkgit:gitrepository-layout[5] document.
748 Read linkgit:githooks[5] for more details about each hook.
750 Higher level SCMs may provide and manage additional information in the
756 Please see linkgit:gitglossary[7].
759 Environment Variables
760 ---------------------
761 Various Git commands use the following environment variables:
765 These environment variables apply to 'all' core Git commands. Nb: it
766 is worth noting that they may be used/overridden by SCMS sitting above
767 Git so take care if using Cogito etc.
770 This environment allows the specification of an alternate
771 index file. If not specified, the default of `$GIT_DIR/index`
774 'GIT_INDEX_VERSION'::
775 This environment variable allows the specification of an index
776 version for new repositories. It won't affect existing index
777 files. By default index file version 2 or 3 is used. See
778 linkgit:git-update-index[1] for more information.
780 'GIT_OBJECT_DIRECTORY'::
781 If the object storage directory is specified via this
782 environment variable then the sha1 directories are created
783 underneath - otherwise the default `$GIT_DIR/objects`
786 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
787 Due to the immutable nature of Git objects, old objects can be
788 archived into shared, read-only directories. This variable
789 specifies a ":" separated (on Windows ";" separated) list
790 of Git object directories which can be used to search for Git
791 objects. New objects will not be written to these directories.
794 If the 'GIT_DIR' environment variable is set then it
795 specifies a path to use instead of the default `.git`
796 for the base of the repository.
797 The '--git-dir' command-line option also sets this value.
800 Set the path to the root of the working tree.
801 This can also be controlled by the '--work-tree' command-line
802 option and the core.worktree configuration variable.
805 Set the Git namespace; see linkgit:gitnamespaces[7] for details.
806 The '--namespace' command-line option also sets this value.
808 'GIT_CEILING_DIRECTORIES'::
809 This should be a colon-separated list of absolute paths. If
810 set, it is a list of directories that Git should not chdir up
811 into while looking for a repository directory (useful for
812 excluding slow-loading network directories). It will not
813 exclude the current working directory or a GIT_DIR set on the
814 command line or in the environment. Normally, Git has to read
815 the entries in this list and resolve any symlink that
816 might be present in order to compare them with the current
817 directory. However, if even this access is slow, you
818 can add an empty entry to the list to tell Git that the
819 subsequent entries are not symlinks and needn't be resolved;
821 'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
823 'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
824 When run in a directory that does not have ".git" repository
825 directory, Git tries to find such a directory in the parent
826 directories to find the top of the working tree, but by default it
827 does not cross filesystem boundaries. This environment variable
828 can be set to true to tell Git not to stop at filesystem
829 boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
830 an explicit repository directory set via 'GIT_DIR' or on the
838 'GIT_COMMITTER_NAME'::
839 'GIT_COMMITTER_EMAIL'::
840 'GIT_COMMITTER_DATE'::
842 see linkgit:git-commit-tree[1]
847 Only valid setting is "--unified=??" or "-u??" to set the
848 number of context lines shown when a unified diff is created.
849 This takes precedence over any "-U" or "--unified" option
850 value passed on the Git diff command line.
852 'GIT_EXTERNAL_DIFF'::
853 When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
854 program named by it is called, instead of the diff invocation
855 described above. For a path that is added, removed, or modified,
856 'GIT_EXTERNAL_DIFF' is called with 7 parameters:
858 path old-file old-hex old-mode new-file new-hex new-mode
862 <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
863 contents of <old|new>,
864 <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
865 <old|new>-mode:: are the octal representation of the file modes.
867 The file parameters can point at the user's working file
868 (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
869 when a new file is added), or a temporary file (e.g. `old-file` in the
870 index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
871 temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
873 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
876 For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
877 'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
879 'GIT_DIFF_PATH_COUNTER'::
880 A 1-based counter incremented by one for every path.
882 'GIT_DIFF_PATH_TOTAL'::
883 The total number of paths.
887 'GIT_MERGE_VERBOSITY'::
888 A number controlling the amount of output shown by
889 the recursive merge strategy. Overrides merge.verbosity.
890 See linkgit:git-merge[1]
893 This environment variable overrides `$PAGER`. If it is set
894 to an empty string or to the value "cat", Git will not launch
895 a pager. See also the `core.pager` option in
896 linkgit:git-config[1].
899 This environment variable overrides `$EDITOR` and `$VISUAL`.
900 It is used by several Git commands when, on interactive mode,
901 an editor is to be launched. See also linkgit:git-var[1]
902 and the `core.editor` option in linkgit:git-config[1].
906 If either of these environment variables is set then 'git fetch'
907 and 'git push' will use the specified command instead of 'ssh'
908 when they need to connect to a remote system.
909 The command will be given exactly two or four arguments: the
910 'username@host' (or just 'host') from the URL and the shell
911 command to execute on that remote system, optionally preceded by
912 '-p' (literally) and the 'port' from the URL when it specifies
913 something other than the default SSH port.
915 `$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
916 by the shell, which allows additional arguments to be included.
917 `$GIT_SSH` on the other hand must be just the path to a program
918 (which can be a wrapper shell script, if additional arguments are
921 Usually it is easier to configure any desired options through your
922 personal `.ssh/config` file. Please consult your ssh documentation
926 If this environment variable is set, then Git commands which need to
927 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
928 will call this program with a suitable prompt as command-line argument
929 and read the password from its STDOUT. See also the 'core.askpass'
930 option in linkgit:git-config[1].
932 'GIT_TERMINAL_PROMPT'::
933 If this environment variable is set to `0`, git will not prompt
934 on the terminal (e.g., when asking for HTTP authentication).
936 'GIT_CONFIG_NOSYSTEM'::
937 Whether to skip reading settings from the system-wide
938 `$(prefix)/etc/gitconfig` file. This environment variable can
939 be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
940 predictable environment for a picky script, or you can set it
941 temporarily to avoid using a buggy `/etc/gitconfig` file while
942 waiting for someone with sufficient permissions to fix it.
945 If this environment variable is set to "1", then commands such
946 as 'git blame' (in incremental mode), 'git rev-list', 'git log',
947 'git check-attr' and 'git check-ignore' will
948 force a flush of the output stream after each record have been
950 variable is set to "0", the output of these commands will be done
951 using completely buffered I/O. If this environment variable is
952 not set, Git will choose buffered or record-oriented flushing
953 based on whether stdout appears to be redirected to a file or not.
956 Enables general trace messages, e.g. alias expansion, built-in
957 command execution and external command execution.
959 If this variable is set to "1", "2" or "true" (comparison
960 is case insensitive), trace messages will be printed to
963 If the variable is set to an integer value greater than 2
964 and lower than 10 (strictly) then Git will interpret this
965 value as an open file descriptor and will try to write the
966 trace messages into this file descriptor.
968 Alternatively, if the variable is set to an absolute path
969 (starting with a '/' character), Git will interpret this
970 as a file path and will try to write the trace messages
973 Unsetting the variable, or setting it to empty, "0" or
974 "false" (case insensitive) disables trace messages.
976 'GIT_TRACE_PACK_ACCESS'::
977 Enables trace messages for all accesses to any packs. For each
978 access, the pack file name and an offset in the pack is
979 recorded. This may be helpful for troubleshooting some
980 pack-related performance problems.
981 See 'GIT_TRACE' for available trace output options.
984 Enables trace messages for all packets coming in or out of a
985 given program. This can help with debugging object negotiation
986 or other protocol issues. Tracing is turned off at a packet
987 starting with "PACK".
988 See 'GIT_TRACE' for available trace output options.
990 'GIT_TRACE_PERFORMANCE'::
991 Enables performance related trace messages, e.g. total execution
992 time of each Git command.
993 See 'GIT_TRACE' for available trace output options.
996 Enables trace messages printing the .git, working tree and current
997 working directory after Git has completed its setup phase.
998 See 'GIT_TRACE' for available trace output options.
1000 'GIT_TRACE_SHALLOW'::
1001 Enables trace messages that can help debugging fetching /
1002 cloning of shallow repositories.
1003 See 'GIT_TRACE' for available trace output options.
1005 GIT_LITERAL_PATHSPECS::
1006 Setting this variable to `1` will cause Git to treat all
1007 pathspecs literally, rather than as glob patterns. For example,
1008 running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
1009 for commits that touch the path `*.c`, not any paths that the
1010 glob `*.c` matches. You might want this if you are feeding
1011 literal paths to Git (e.g., paths previously given to you by
1012 `git ls-tree`, `--raw` diff output, etc).
1014 GIT_GLOB_PATHSPECS::
1015 Setting this variable to `1` will cause Git to treat all
1016 pathspecs as glob patterns (aka "glob" magic).
1018 GIT_NOGLOB_PATHSPECS::
1019 Setting this variable to `1` will cause Git to treat all
1020 pathspecs as literal (aka "literal" magic).
1022 GIT_ICASE_PATHSPECS::
1023 Setting this variable to `1` will cause Git to treat all
1024 pathspecs as case-insensitive.
1026 'GIT_REFLOG_ACTION'::
1027 When a ref is updated, reflog entries are created to keep
1028 track of the reason why the ref was updated (which is
1029 typically the name of the high-level command that updated
1030 the ref), in addition to the old and new values of the ref.
1031 A scripted Porcelain command can use set_reflog_action
1032 helper function in `git-sh-setup` to set its name to this
1033 variable when it is invoked as the top level command by the
1034 end user, to be recorded in the body of the reflog.
1036 `GIT_REF_PARANOIA`::
1037 If set to `1`, include broken or badly named refs when iterating
1038 over lists of refs. In a normal, non-corrupted repository, this
1039 does nothing. However, enabling it may help git to detect and
1040 abort some operations in the presence of broken refs. Git sets
1041 this variable automatically when performing destructive
1042 operations like linkgit:git-prune[1]. You should not need to set
1043 it yourself unless you want to be paranoid about making sure
1044 an operation has touched every ref (e.g., because you are
1045 cloning a repository to make a backup).
1048 Discussion[[Discussion]]
1049 ------------------------
1051 More detail on the following is available from the
1052 link:user-manual.html#git-concepts[Git concepts chapter of the
1053 user-manual] and linkgit:gitcore-tutorial[7].
1055 A Git project normally consists of a working directory with a ".git"
1056 subdirectory at the top level. The .git directory contains, among other
1057 things, a compressed object database representing the complete history
1058 of the project, an "index" file which links that history to the current
1059 contents of the working tree, and named pointers into that history such
1060 as tags and branch heads.
1062 The object database contains objects of three main types: blobs, which
1063 hold file data; trees, which point to blobs and other trees to build up
1064 directory hierarchies; and commits, which each reference a single tree
1065 and some number of parent commits.
1067 The commit, equivalent to what other systems call a "changeset" or
1068 "version", represents a step in the project's history, and each parent
1069 represents an immediately preceding step. Commits with more than one
1070 parent represent merges of independent lines of development.
1072 All objects are named by the SHA-1 hash of their contents, normally
1073 written as a string of 40 hex digits. Such names are globally unique.
1074 The entire history leading up to a commit can be vouched for by signing
1075 just that commit. A fourth object type, the tag, is provided for this
1078 When first created, objects are stored in individual files, but for
1079 efficiency may later be compressed together into "pack files".
1081 Named pointers called refs mark interesting points in history. A ref
1082 may contain the SHA-1 name of an object or the name of another ref. Refs
1083 with names beginning `ref/head/` contain the SHA-1 name of the most
1084 recent commit (or "head") of a branch under development. SHA-1 names of
1085 tags of interest are stored under `ref/tags/`. A special ref named
1086 `HEAD` contains the name of the currently checked-out branch.
1088 The index file is initialized with a list of all paths and, for each
1089 path, a blob object and a set of attributes. The blob object represents
1090 the contents of the file as of the head of the current branch. The
1091 attributes (last modified time, size, etc.) are taken from the
1092 corresponding file in the working tree. Subsequent changes to the
1093 working tree can be found by comparing these attributes. The index may
1094 be updated with new content, and new commits may be created from the
1095 content stored in the index.
1097 The index is also capable of storing multiple entries (called "stages")
1098 for a given pathname. These stages are used to hold the various
1099 unmerged version of a file when a merge is in progress.
1101 FURTHER DOCUMENTATION
1102 ---------------------
1104 See the references in the "description" section to get started
1105 using Git. The following is probably more detail than necessary
1106 for a first-time user.
1108 The link:user-manual.html#git-concepts[Git concepts chapter of the
1109 user-manual] and linkgit:gitcore-tutorial[7] both provide
1110 introductions to the underlying Git architecture.
1112 See linkgit:gitworkflows[7] for an overview of recommended workflows.
1114 See also the link:howto-index.html[howto] documents for some useful
1117 The internals are documented in the
1118 link:technical/api-index.html[Git API documentation].
1120 Users migrating from CVS may also want to
1121 read linkgit:gitcvs-migration[7].
1126 Git was started by Linus Torvalds, and is currently maintained by Junio
1127 C Hamano. Numerous contributions have come from the Git mailing list
1128 <git@vger.kernel.org>. http://www.openhub.net/p/git/contributors/summary
1129 gives you a more complete list of contributors.
1131 If you have a clone of git.git itself, the
1132 output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1133 the authors for specific parts of the project.
1138 Report bugs to the Git mailing list <git@vger.kernel.org> where the
1139 development and maintenance is primarily done. You do not have to be
1140 subscribed to the list to send a message there.
1144 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
1145 linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
1146 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
1147 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1148 linkgit:gitworkflows[7]
1152 Part of the linkgit:git[1] suite