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.5.3/git.html[documentation for release 2.5.3]
49 link:RelNotes/2.5.3.txt[2.5.3],
50 link:RelNotes/2.5.2.txt[2.5.2],
51 link:RelNotes/2.5.1.txt[2.5.1],
52 link:RelNotes/2.5.0.txt[2.5].
54 * link:v2.4.9/git.html[documentation for release 2.4.9]
57 link:RelNotes/2.4.9.txt[2.4.9],
58 link:RelNotes/2.4.8.txt[2.4.8],
59 link:RelNotes/2.4.7.txt[2.4.7],
60 link:RelNotes/2.4.6.txt[2.4.6],
61 link:RelNotes/2.4.5.txt[2.4.5],
62 link:RelNotes/2.4.4.txt[2.4.4],
63 link:RelNotes/2.4.3.txt[2.4.3],
64 link:RelNotes/2.4.2.txt[2.4.2],
65 link:RelNotes/2.4.1.txt[2.4.1],
66 link:RelNotes/2.4.0.txt[2.4].
68 * link:v2.3.9/git.html[documentation for release 2.3.9]
71 link:RelNotes/2.3.9.txt[2.3.9],
72 link:RelNotes/2.3.8.txt[2.3.8],
73 link:RelNotes/2.3.7.txt[2.3.7],
74 link:RelNotes/2.3.6.txt[2.3.6],
75 link:RelNotes/2.3.5.txt[2.3.5],
76 link:RelNotes/2.3.4.txt[2.3.4],
77 link:RelNotes/2.3.3.txt[2.3.3],
78 link:RelNotes/2.3.2.txt[2.3.2],
79 link:RelNotes/2.3.1.txt[2.3.1],
80 link:RelNotes/2.3.0.txt[2.3].
82 * link:v2.2.3/git.html[documentation for release 2.2.3]
85 link:RelNotes/2.2.3.txt[2.2.3],
86 link:RelNotes/2.2.2.txt[2.2.2],
87 link:RelNotes/2.2.1.txt[2.2.1],
88 link:RelNotes/2.2.0.txt[2.2].
90 * link:v2.1.4/git.html[documentation for release 2.1.4]
93 link:RelNotes/2.1.4.txt[2.1.4],
94 link:RelNotes/2.1.3.txt[2.1.3],
95 link:RelNotes/2.1.2.txt[2.1.2],
96 link:RelNotes/2.1.1.txt[2.1.1],
97 link:RelNotes/2.1.0.txt[2.1].
99 * link:v2.0.5/git.html[documentation for release 2.0.5]
102 link:RelNotes/2.0.5.txt[2.0.5],
103 link:RelNotes/2.0.4.txt[2.0.4],
104 link:RelNotes/2.0.3.txt[2.0.3],
105 link:RelNotes/2.0.2.txt[2.0.2],
106 link:RelNotes/2.0.1.txt[2.0.1],
107 link:RelNotes/2.0.0.txt[2.0.0].
109 * link:v1.9.5/git.html[documentation for release 1.9.5]
112 link:RelNotes/1.9.5.txt[1.9.5],
113 link:RelNotes/1.9.4.txt[1.9.4],
114 link:RelNotes/1.9.3.txt[1.9.3],
115 link:RelNotes/1.9.2.txt[1.9.2],
116 link:RelNotes/1.9.1.txt[1.9.1],
117 link:RelNotes/1.9.0.txt[1.9.0].
119 * link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
122 link:RelNotes/1.8.5.6.txt[1.8.5.6],
123 link:RelNotes/1.8.5.5.txt[1.8.5.5],
124 link:RelNotes/1.8.5.4.txt[1.8.5.4],
125 link:RelNotes/1.8.5.3.txt[1.8.5.3],
126 link:RelNotes/1.8.5.2.txt[1.8.5.2],
127 link:RelNotes/1.8.5.1.txt[1.8.5.1],
128 link:RelNotes/1.8.5.txt[1.8.5].
130 * link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
133 link:RelNotes/1.8.4.5.txt[1.8.4.5],
134 link:RelNotes/1.8.4.4.txt[1.8.4.4],
135 link:RelNotes/1.8.4.3.txt[1.8.4.3],
136 link:RelNotes/1.8.4.2.txt[1.8.4.2],
137 link:RelNotes/1.8.4.1.txt[1.8.4.1],
138 link:RelNotes/1.8.4.txt[1.8.4].
140 * link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
143 link:RelNotes/1.8.3.4.txt[1.8.3.4],
144 link:RelNotes/1.8.3.3.txt[1.8.3.3],
145 link:RelNotes/1.8.3.2.txt[1.8.3.2],
146 link:RelNotes/1.8.3.1.txt[1.8.3.1],
147 link:RelNotes/1.8.3.txt[1.8.3].
149 * link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
152 link:RelNotes/1.8.2.3.txt[1.8.2.3],
153 link:RelNotes/1.8.2.2.txt[1.8.2.2],
154 link:RelNotes/1.8.2.1.txt[1.8.2.1],
155 link:RelNotes/1.8.2.txt[1.8.2].
157 * link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
160 link:RelNotes/1.8.1.6.txt[1.8.1.6],
161 link:RelNotes/1.8.1.5.txt[1.8.1.5],
162 link:RelNotes/1.8.1.4.txt[1.8.1.4],
163 link:RelNotes/1.8.1.3.txt[1.8.1.3],
164 link:RelNotes/1.8.1.2.txt[1.8.1.2],
165 link:RelNotes/1.8.1.1.txt[1.8.1.1],
166 link:RelNotes/1.8.1.txt[1.8.1].
168 * link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
171 link:RelNotes/1.8.0.3.txt[1.8.0.3],
172 link:RelNotes/1.8.0.2.txt[1.8.0.2],
173 link:RelNotes/1.8.0.1.txt[1.8.0.1],
174 link:RelNotes/1.8.0.txt[1.8.0].
176 * link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
179 link:RelNotes/1.7.12.4.txt[1.7.12.4],
180 link:RelNotes/1.7.12.3.txt[1.7.12.3],
181 link:RelNotes/1.7.12.2.txt[1.7.12.2],
182 link:RelNotes/1.7.12.1.txt[1.7.12.1],
183 link:RelNotes/1.7.12.txt[1.7.12].
185 * link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
188 link:RelNotes/1.7.11.7.txt[1.7.11.7],
189 link:RelNotes/1.7.11.6.txt[1.7.11.6],
190 link:RelNotes/1.7.11.5.txt[1.7.11.5],
191 link:RelNotes/1.7.11.4.txt[1.7.11.4],
192 link:RelNotes/1.7.11.3.txt[1.7.11.3],
193 link:RelNotes/1.7.11.2.txt[1.7.11.2],
194 link:RelNotes/1.7.11.1.txt[1.7.11.1],
195 link:RelNotes/1.7.11.txt[1.7.11].
197 * link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
200 link:RelNotes/1.7.10.5.txt[1.7.10.5],
201 link:RelNotes/1.7.10.4.txt[1.7.10.4],
202 link:RelNotes/1.7.10.3.txt[1.7.10.3],
203 link:RelNotes/1.7.10.2.txt[1.7.10.2],
204 link:RelNotes/1.7.10.1.txt[1.7.10.1],
205 link:RelNotes/1.7.10.txt[1.7.10].
207 * link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
210 link:RelNotes/1.7.9.7.txt[1.7.9.7],
211 link:RelNotes/1.7.9.6.txt[1.7.9.6],
212 link:RelNotes/1.7.9.5.txt[1.7.9.5],
213 link:RelNotes/1.7.9.4.txt[1.7.9.4],
214 link:RelNotes/1.7.9.3.txt[1.7.9.3],
215 link:RelNotes/1.7.9.2.txt[1.7.9.2],
216 link:RelNotes/1.7.9.1.txt[1.7.9.1],
217 link:RelNotes/1.7.9.txt[1.7.9].
219 * link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
222 link:RelNotes/1.7.8.6.txt[1.7.8.6],
223 link:RelNotes/1.7.8.5.txt[1.7.8.5],
224 link:RelNotes/1.7.8.4.txt[1.7.8.4],
225 link:RelNotes/1.7.8.3.txt[1.7.8.3],
226 link:RelNotes/1.7.8.2.txt[1.7.8.2],
227 link:RelNotes/1.7.8.1.txt[1.7.8.1],
228 link:RelNotes/1.7.8.txt[1.7.8].
230 * link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
233 link:RelNotes/1.7.7.7.txt[1.7.7.7],
234 link:RelNotes/1.7.7.6.txt[1.7.7.6],
235 link:RelNotes/1.7.7.5.txt[1.7.7.5],
236 link:RelNotes/1.7.7.4.txt[1.7.7.4],
237 link:RelNotes/1.7.7.3.txt[1.7.7.3],
238 link:RelNotes/1.7.7.2.txt[1.7.7.2],
239 link:RelNotes/1.7.7.1.txt[1.7.7.1],
240 link:RelNotes/1.7.7.txt[1.7.7].
242 * link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
245 link:RelNotes/1.7.6.6.txt[1.7.6.6],
246 link:RelNotes/1.7.6.5.txt[1.7.6.5],
247 link:RelNotes/1.7.6.4.txt[1.7.6.4],
248 link:RelNotes/1.7.6.3.txt[1.7.6.3],
249 link:RelNotes/1.7.6.2.txt[1.7.6.2],
250 link:RelNotes/1.7.6.1.txt[1.7.6.1],
251 link:RelNotes/1.7.6.txt[1.7.6].
253 * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
256 link:RelNotes/1.7.5.4.txt[1.7.5.4],
257 link:RelNotes/1.7.5.3.txt[1.7.5.3],
258 link:RelNotes/1.7.5.2.txt[1.7.5.2],
259 link:RelNotes/1.7.5.1.txt[1.7.5.1],
260 link:RelNotes/1.7.5.txt[1.7.5].
262 * link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
265 link:RelNotes/1.7.4.5.txt[1.7.4.5],
266 link:RelNotes/1.7.4.4.txt[1.7.4.4],
267 link:RelNotes/1.7.4.3.txt[1.7.4.3],
268 link:RelNotes/1.7.4.2.txt[1.7.4.2],
269 link:RelNotes/1.7.4.1.txt[1.7.4.1],
270 link:RelNotes/1.7.4.txt[1.7.4].
272 * link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
275 link:RelNotes/1.7.3.5.txt[1.7.3.5],
276 link:RelNotes/1.7.3.4.txt[1.7.3.4],
277 link:RelNotes/1.7.3.3.txt[1.7.3.3],
278 link:RelNotes/1.7.3.2.txt[1.7.3.2],
279 link:RelNotes/1.7.3.1.txt[1.7.3.1],
280 link:RelNotes/1.7.3.txt[1.7.3].
282 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
285 link:RelNotes/1.7.2.5.txt[1.7.2.5],
286 link:RelNotes/1.7.2.4.txt[1.7.2.4],
287 link:RelNotes/1.7.2.3.txt[1.7.2.3],
288 link:RelNotes/1.7.2.2.txt[1.7.2.2],
289 link:RelNotes/1.7.2.1.txt[1.7.2.1],
290 link:RelNotes/1.7.2.txt[1.7.2].
292 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
295 link:RelNotes/1.7.1.4.txt[1.7.1.4],
296 link:RelNotes/1.7.1.3.txt[1.7.1.3],
297 link:RelNotes/1.7.1.2.txt[1.7.1.2],
298 link:RelNotes/1.7.1.1.txt[1.7.1.1],
299 link:RelNotes/1.7.1.txt[1.7.1].
301 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
304 link:RelNotes/1.7.0.9.txt[1.7.0.9],
305 link:RelNotes/1.7.0.8.txt[1.7.0.8],
306 link:RelNotes/1.7.0.7.txt[1.7.0.7],
307 link:RelNotes/1.7.0.6.txt[1.7.0.6],
308 link:RelNotes/1.7.0.5.txt[1.7.0.5],
309 link:RelNotes/1.7.0.4.txt[1.7.0.4],
310 link:RelNotes/1.7.0.3.txt[1.7.0.3],
311 link:RelNotes/1.7.0.2.txt[1.7.0.2],
312 link:RelNotes/1.7.0.1.txt[1.7.0.1],
313 link:RelNotes/1.7.0.txt[1.7.0].
315 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
318 link:RelNotes/1.6.6.3.txt[1.6.6.3],
319 link:RelNotes/1.6.6.2.txt[1.6.6.2],
320 link:RelNotes/1.6.6.1.txt[1.6.6.1],
321 link:RelNotes/1.6.6.txt[1.6.6].
323 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
326 link:RelNotes/1.6.5.9.txt[1.6.5.9],
327 link:RelNotes/1.6.5.8.txt[1.6.5.8],
328 link:RelNotes/1.6.5.7.txt[1.6.5.7],
329 link:RelNotes/1.6.5.6.txt[1.6.5.6],
330 link:RelNotes/1.6.5.5.txt[1.6.5.5],
331 link:RelNotes/1.6.5.4.txt[1.6.5.4],
332 link:RelNotes/1.6.5.3.txt[1.6.5.3],
333 link:RelNotes/1.6.5.2.txt[1.6.5.2],
334 link:RelNotes/1.6.5.1.txt[1.6.5.1],
335 link:RelNotes/1.6.5.txt[1.6.5].
337 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
340 link:RelNotes/1.6.4.5.txt[1.6.4.5],
341 link:RelNotes/1.6.4.4.txt[1.6.4.4],
342 link:RelNotes/1.6.4.3.txt[1.6.4.3],
343 link:RelNotes/1.6.4.2.txt[1.6.4.2],
344 link:RelNotes/1.6.4.1.txt[1.6.4.1],
345 link:RelNotes/1.6.4.txt[1.6.4].
347 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
350 link:RelNotes/1.6.3.4.txt[1.6.3.4],
351 link:RelNotes/1.6.3.3.txt[1.6.3.3],
352 link:RelNotes/1.6.3.2.txt[1.6.3.2],
353 link:RelNotes/1.6.3.1.txt[1.6.3.1],
354 link:RelNotes/1.6.3.txt[1.6.3].
357 link:RelNotes/1.6.2.5.txt[1.6.2.5],
358 link:RelNotes/1.6.2.4.txt[1.6.2.4],
359 link:RelNotes/1.6.2.3.txt[1.6.2.3],
360 link:RelNotes/1.6.2.2.txt[1.6.2.2],
361 link:RelNotes/1.6.2.1.txt[1.6.2.1],
362 link:RelNotes/1.6.2.txt[1.6.2].
364 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
367 link:RelNotes/1.6.1.3.txt[1.6.1.3],
368 link:RelNotes/1.6.1.2.txt[1.6.1.2],
369 link:RelNotes/1.6.1.1.txt[1.6.1.1],
370 link:RelNotes/1.6.1.txt[1.6.1].
372 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
375 link:RelNotes/1.6.0.6.txt[1.6.0.6],
376 link:RelNotes/1.6.0.5.txt[1.6.0.5],
377 link:RelNotes/1.6.0.4.txt[1.6.0.4],
378 link:RelNotes/1.6.0.3.txt[1.6.0.3],
379 link:RelNotes/1.6.0.2.txt[1.6.0.2],
380 link:RelNotes/1.6.0.1.txt[1.6.0.1],
381 link:RelNotes/1.6.0.txt[1.6.0].
383 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
386 link:RelNotes/1.5.6.6.txt[1.5.6.6],
387 link:RelNotes/1.5.6.5.txt[1.5.6.5],
388 link:RelNotes/1.5.6.4.txt[1.5.6.4],
389 link:RelNotes/1.5.6.3.txt[1.5.6.3],
390 link:RelNotes/1.5.6.2.txt[1.5.6.2],
391 link:RelNotes/1.5.6.1.txt[1.5.6.1],
392 link:RelNotes/1.5.6.txt[1.5.6].
394 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
397 link:RelNotes/1.5.5.6.txt[1.5.5.6],
398 link:RelNotes/1.5.5.5.txt[1.5.5.5],
399 link:RelNotes/1.5.5.4.txt[1.5.5.4],
400 link:RelNotes/1.5.5.3.txt[1.5.5.3],
401 link:RelNotes/1.5.5.2.txt[1.5.5.2],
402 link:RelNotes/1.5.5.1.txt[1.5.5.1],
403 link:RelNotes/1.5.5.txt[1.5.5].
405 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
408 link:RelNotes/1.5.4.7.txt[1.5.4.7],
409 link:RelNotes/1.5.4.6.txt[1.5.4.6],
410 link:RelNotes/1.5.4.5.txt[1.5.4.5],
411 link:RelNotes/1.5.4.4.txt[1.5.4.4],
412 link:RelNotes/1.5.4.3.txt[1.5.4.3],
413 link:RelNotes/1.5.4.2.txt[1.5.4.2],
414 link:RelNotes/1.5.4.1.txt[1.5.4.1],
415 link:RelNotes/1.5.4.txt[1.5.4].
417 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
420 link:RelNotes/1.5.3.8.txt[1.5.3.8],
421 link:RelNotes/1.5.3.7.txt[1.5.3.7],
422 link:RelNotes/1.5.3.6.txt[1.5.3.6],
423 link:RelNotes/1.5.3.5.txt[1.5.3.5],
424 link:RelNotes/1.5.3.4.txt[1.5.3.4],
425 link:RelNotes/1.5.3.3.txt[1.5.3.3],
426 link:RelNotes/1.5.3.2.txt[1.5.3.2],
427 link:RelNotes/1.5.3.1.txt[1.5.3.1],
428 link:RelNotes/1.5.3.txt[1.5.3].
430 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
433 link:RelNotes/1.5.2.5.txt[1.5.2.5],
434 link:RelNotes/1.5.2.4.txt[1.5.2.4],
435 link:RelNotes/1.5.2.3.txt[1.5.2.3],
436 link:RelNotes/1.5.2.2.txt[1.5.2.2],
437 link:RelNotes/1.5.2.1.txt[1.5.2.1],
438 link:RelNotes/1.5.2.txt[1.5.2].
440 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
443 link:RelNotes/1.5.1.6.txt[1.5.1.6],
444 link:RelNotes/1.5.1.5.txt[1.5.1.5],
445 link:RelNotes/1.5.1.4.txt[1.5.1.4],
446 link:RelNotes/1.5.1.3.txt[1.5.1.3],
447 link:RelNotes/1.5.1.2.txt[1.5.1.2],
448 link:RelNotes/1.5.1.1.txt[1.5.1.1],
449 link:RelNotes/1.5.1.txt[1.5.1].
451 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
454 link:RelNotes/1.5.0.7.txt[1.5.0.7],
455 link:RelNotes/1.5.0.6.txt[1.5.0.6],
456 link:RelNotes/1.5.0.5.txt[1.5.0.5],
457 link:RelNotes/1.5.0.3.txt[1.5.0.3],
458 link:RelNotes/1.5.0.2.txt[1.5.0.2],
459 link:RelNotes/1.5.0.1.txt[1.5.0.1],
460 link:RelNotes/1.5.0.txt[1.5.0].
462 * documentation for release link:v1.4.4.4/git.html[1.4.4.4],
463 link:v1.3.3/git.html[1.3.3],
464 link:v1.2.6/git.html[1.2.6],
465 link:v1.0.13/git.html[1.0.13].
474 Prints the Git suite version that the 'git' program came from.
477 Prints the synopsis and a list of the most commonly used
478 commands. If the option '--all' or '-a' is given then all
479 available commands are printed. If a Git command is named this
480 option will bring up the manual page for that command.
482 Other options are available to control how the manual page is
483 displayed. See linkgit:git-help[1] for more information,
484 because `git --help ...` is converted internally into `git
488 Run as if git was started in '<path>' instead of the current working
489 directory. When multiple `-C` options are given, each subsequent
490 non-absolute `-C <path>` is interpreted relative to the preceding `-C
493 This option affects options that expect path name like `--git-dir` and
494 `--work-tree` in that their interpretations of the path names would be
495 made relative to the working directory caused by the `-C` option. For
496 example the following invocations are equivalent:
498 git --git-dir=a.git --work-tree=b -C c status
499 git --git-dir=c/a.git --work-tree=c/b status
502 Pass a configuration parameter to the command. The value
503 given will override values from configuration files.
504 The <name> is expected in the same format as listed by
505 'git config' (subkeys separated by dots).
507 Note that omitting the `=` in `git -c foo.bar ...` is allowed and sets
508 `foo.bar` to the boolean true value (just like `[foo]bar` would in a
509 config file). Including the equals but with an empty value (like `git -c
510 foo.bar= ...`) sets `foo.bar` to the empty string.
512 --exec-path[=<path>]::
513 Path to wherever your core Git programs are installed.
514 This can also be controlled by setting the GIT_EXEC_PATH
515 environment variable. If no path is given, 'git' will print
516 the current setting and then exit.
519 Print the path, without trailing slash, where Git's HTML
520 documentation is installed and exit.
523 Print the manpath (see `man(1)`) for the man pages for
524 this version of Git and exit.
527 Print the path where the Info files documenting this
528 version of Git are installed and exit.
532 Pipe all output into 'less' (or if set, $PAGER) if standard
533 output is a terminal. This overrides the `pager.<cmd>`
534 configuration options (see the "Configuration Mechanism" section
538 Do not pipe Git output into a pager.
541 Set the path to the repository. This can also be controlled by
542 setting the GIT_DIR environment variable. It can be an absolute
543 path or relative path to current working directory.
546 Set the path to the working tree. It can be an absolute path
547 or a path relative to the current working directory.
548 This can also be controlled by setting the GIT_WORK_TREE
549 environment variable and the core.worktree configuration
550 variable (see core.worktree in linkgit:git-config[1] for a
551 more detailed discussion).
554 Set the Git namespace. See linkgit:gitnamespaces[7] for more
555 details. Equivalent to setting the `GIT_NAMESPACE` environment
559 Treat the repository as a bare repository. If GIT_DIR
560 environment is not set, it is set to the current working
563 --no-replace-objects::
564 Do not use replacement refs to replace Git objects. See
565 linkgit:git-replace[1] for more information.
567 --literal-pathspecs::
568 Treat pathspecs literally (i.e. no globbing, no pathspec magic).
569 This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
573 Add "glob" magic to all pathspec. This is equivalent to setting
574 the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
575 globbing on individual pathspecs can be done using pathspec
579 Add "literal" magic to all pathspec. This is equivalent to setting
580 the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
581 globbing on individual pathspecs can be done using pathspec
585 Add "icase" magic to all pathspec. This is equivalent to setting
586 the `GIT_ICASE_PATHSPECS` environment variable to `1`.
591 We divide Git into high level ("porcelain") commands and low level
592 ("plumbing") commands.
594 High-level commands (porcelain)
595 -------------------------------
597 We separate the porcelain commands into the main commands and some
598 ancillary user utilities.
600 Main porcelain commands
601 ~~~~~~~~~~~~~~~~~~~~~~~
603 include::cmds-mainporcelain.txt[]
609 include::cmds-ancillarymanipulators.txt[]
613 include::cmds-ancillaryinterrogators.txt[]
616 Interacting with Others
617 ~~~~~~~~~~~~~~~~~~~~~~~
619 These commands are to interact with foreign SCM and with other
620 people via patch over e-mail.
622 include::cmds-foreignscminterface.txt[]
625 Low-level commands (plumbing)
626 -----------------------------
628 Although Git includes its
629 own porcelain layer, its low-level commands are sufficient to support
630 development of alternative porcelains. Developers of such porcelains
631 might start by reading about linkgit:git-update-index[1] and
632 linkgit:git-read-tree[1].
634 The interface (input, output, set of options and the semantics)
635 to these low-level commands are meant to be a lot more stable
636 than Porcelain level commands, because these commands are
637 primarily for scripted use. The interface to Porcelain commands
638 on the other hand are subject to change in order to improve the
641 The following description divides
642 the low-level commands into commands that manipulate objects (in
643 the repository, index, and working tree), commands that interrogate and
644 compare objects, and commands that move objects and references between
648 Manipulation commands
649 ~~~~~~~~~~~~~~~~~~~~~
651 include::cmds-plumbingmanipulators.txt[]
654 Interrogation commands
655 ~~~~~~~~~~~~~~~~~~~~~~
657 include::cmds-plumbinginterrogators.txt[]
659 In general, the interrogate commands do not touch the files in
663 Synching repositories
664 ~~~~~~~~~~~~~~~~~~~~~
666 include::cmds-synchingrepositories.txt[]
668 The following are helper commands used by the above; end users
669 typically do not use them directly.
671 include::cmds-synchelpers.txt[]
674 Internal helper commands
675 ~~~~~~~~~~~~~~~~~~~~~~~~
677 These are internal helper commands used by other commands; end
678 users typically do not use them directly.
680 include::cmds-purehelpers.txt[]
683 Configuration Mechanism
684 -----------------------
686 Git uses a simple text format to store customizations that are per
687 repository and are per user. Such a configuration file may look
692 # A '#' or ';' character indicates a comment.
697 ; Don't trust file modes
702 name = "Junio C Hamano"
703 email = "gitster@pobox.com"
707 Various commands read from the configuration file and adjust
708 their operation accordingly. See linkgit:git-config[1] for a
709 list and more details about the configuration mechanism.
712 Identifier Terminology
713 ----------------------
715 Indicates the object name for any type of object.
718 Indicates a blob object name.
721 Indicates a tree object name.
724 Indicates a commit object name.
727 Indicates a tree, commit or tag object name. A
728 command that takes a <tree-ish> argument ultimately wants to
729 operate on a <tree> object but automatically dereferences
730 <commit> and <tag> objects that point at a <tree>.
733 Indicates a commit or tag object name. A
734 command that takes a <commit-ish> argument ultimately wants to
735 operate on a <commit> object but automatically dereferences
736 <tag> objects that point at a <commit>.
739 Indicates that an object type is required.
740 Currently one of: `blob`, `tree`, `commit`, or `tag`.
743 Indicates a filename - almost always relative to the
744 root of the tree structure `GIT_INDEX_FILE` describes.
748 Any Git command accepting any <object> can also use the following
752 indicates the head of the current branch.
756 (i.e. a `refs/tags/<tag>` reference).
760 (i.e. a `refs/heads/<head>` reference).
762 For a more complete list of ways to spell object names, see
763 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
766 File/Directory Structure
767 ------------------------
769 Please see the linkgit:gitrepository-layout[5] document.
771 Read linkgit:githooks[5] for more details about each hook.
773 Higher level SCMs may provide and manage additional information in the
779 Please see linkgit:gitglossary[7].
782 Environment Variables
783 ---------------------
784 Various Git commands use the following environment variables:
788 These environment variables apply to 'all' core Git commands. Nb: it
789 is worth noting that they may be used/overridden by SCMS sitting above
790 Git so take care if using a foreign front-end.
793 This environment allows the specification of an alternate
794 index file. If not specified, the default of `$GIT_DIR/index`
797 'GIT_INDEX_VERSION'::
798 This environment variable allows the specification of an index
799 version for new repositories. It won't affect existing index
800 files. By default index file version 2 or 3 is used. See
801 linkgit:git-update-index[1] for more information.
803 'GIT_OBJECT_DIRECTORY'::
804 If the object storage directory is specified via this
805 environment variable then the sha1 directories are created
806 underneath - otherwise the default `$GIT_DIR/objects`
809 'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
810 Due to the immutable nature of Git objects, old objects can be
811 archived into shared, read-only directories. This variable
812 specifies a ":" separated (on Windows ";" separated) list
813 of Git object directories which can be used to search for Git
814 objects. New objects will not be written to these directories.
817 If the 'GIT_DIR' environment variable is set then it
818 specifies a path to use instead of the default `.git`
819 for the base of the repository.
820 The '--git-dir' command-line option also sets this value.
823 Set the path to the root of the working tree.
824 This can also be controlled by the '--work-tree' command-line
825 option and the core.worktree configuration variable.
828 Set the Git namespace; see linkgit:gitnamespaces[7] for details.
829 The '--namespace' command-line option also sets this value.
831 'GIT_CEILING_DIRECTORIES'::
832 This should be a colon-separated list of absolute paths. If
833 set, it is a list of directories that Git should not chdir up
834 into while looking for a repository directory (useful for
835 excluding slow-loading network directories). It will not
836 exclude the current working directory or a GIT_DIR set on the
837 command line or in the environment. Normally, Git has to read
838 the entries in this list and resolve any symlink that
839 might be present in order to compare them with the current
840 directory. However, if even this access is slow, you
841 can add an empty entry to the list to tell Git that the
842 subsequent entries are not symlinks and needn't be resolved;
844 'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
846 'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
847 When run in a directory that does not have ".git" repository
848 directory, Git tries to find such a directory in the parent
849 directories to find the top of the working tree, but by default it
850 does not cross filesystem boundaries. This environment variable
851 can be set to true to tell Git not to stop at filesystem
852 boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
853 an explicit repository directory set via 'GIT_DIR' or on the
857 If this variable is set to a path, non-worktree files that are
858 normally in $GIT_DIR will be taken from this path
859 instead. Worktree-specific files such as HEAD or index are
860 taken from $GIT_DIR. See linkgit:gitrepository-layout[5] and
861 linkgit:git-worktree[1] for
862 details. This variable has lower precedence than other path
863 variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY...
870 'GIT_COMMITTER_NAME'::
871 'GIT_COMMITTER_EMAIL'::
872 'GIT_COMMITTER_DATE'::
874 see linkgit:git-commit-tree[1]
879 Only valid setting is "--unified=??" or "-u??" to set the
880 number of context lines shown when a unified diff is created.
881 This takes precedence over any "-U" or "--unified" option
882 value passed on the Git diff command line.
884 'GIT_EXTERNAL_DIFF'::
885 When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
886 program named by it is called, instead of the diff invocation
887 described above. For a path that is added, removed, or modified,
888 'GIT_EXTERNAL_DIFF' is called with 7 parameters:
890 path old-file old-hex old-mode new-file new-hex new-mode
894 <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
895 contents of <old|new>,
896 <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
897 <old|new>-mode:: are the octal representation of the file modes.
899 The file parameters can point at the user's working file
900 (e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
901 when a new file is added), or a temporary file (e.g. `old-file` in the
902 index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
903 temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
905 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
908 For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
909 'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
911 'GIT_DIFF_PATH_COUNTER'::
912 A 1-based counter incremented by one for every path.
914 'GIT_DIFF_PATH_TOTAL'::
915 The total number of paths.
919 'GIT_MERGE_VERBOSITY'::
920 A number controlling the amount of output shown by
921 the recursive merge strategy. Overrides merge.verbosity.
922 See linkgit:git-merge[1]
925 This environment variable overrides `$PAGER`. If it is set
926 to an empty string or to the value "cat", Git will not launch
927 a pager. See also the `core.pager` option in
928 linkgit:git-config[1].
931 This environment variable overrides `$EDITOR` and `$VISUAL`.
932 It is used by several Git commands when, on interactive mode,
933 an editor is to be launched. See also linkgit:git-var[1]
934 and the `core.editor` option in linkgit:git-config[1].
938 If either of these environment variables is set then 'git fetch'
939 and 'git push' will use the specified command instead of 'ssh'
940 when they need to connect to a remote system.
941 The command will be given exactly two or four arguments: the
942 'username@host' (or just 'host') from the URL and the shell
943 command to execute on that remote system, optionally preceded by
944 '-p' (literally) and the 'port' from the URL when it specifies
945 something other than the default SSH port.
947 `$GIT_SSH_COMMAND` takes precedence over `$GIT_SSH`, and is interpreted
948 by the shell, which allows additional arguments to be included.
949 `$GIT_SSH` on the other hand must be just the path to a program
950 (which can be a wrapper shell script, if additional arguments are
953 Usually it is easier to configure any desired options through your
954 personal `.ssh/config` file. Please consult your ssh documentation
958 If this environment variable is set, then Git commands which need to
959 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
960 will call this program with a suitable prompt as command-line argument
961 and read the password from its STDOUT. See also the 'core.askPass'
962 option in linkgit:git-config[1].
964 'GIT_TERMINAL_PROMPT'::
965 If this environment variable is set to `0`, git will not prompt
966 on the terminal (e.g., when asking for HTTP authentication).
968 'GIT_CONFIG_NOSYSTEM'::
969 Whether to skip reading settings from the system-wide
970 `$(prefix)/etc/gitconfig` file. This environment variable can
971 be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
972 predictable environment for a picky script, or you can set it
973 temporarily to avoid using a buggy `/etc/gitconfig` file while
974 waiting for someone with sufficient permissions to fix it.
977 If this environment variable is set to "1", then commands such
978 as 'git blame' (in incremental mode), 'git rev-list', 'git log',
979 'git check-attr' and 'git check-ignore' will
980 force a flush of the output stream after each record have been
982 variable is set to "0", the output of these commands will be done
983 using completely buffered I/O. If this environment variable is
984 not set, Git will choose buffered or record-oriented flushing
985 based on whether stdout appears to be redirected to a file or not.
988 Enables general trace messages, e.g. alias expansion, built-in
989 command execution and external command execution.
991 If this variable is set to "1", "2" or "true" (comparison
992 is case insensitive), trace messages will be printed to
995 If the variable is set to an integer value greater than 2
996 and lower than 10 (strictly) then Git will interpret this
997 value as an open file descriptor and will try to write the
998 trace messages into this file descriptor.
1000 Alternatively, if the variable is set to an absolute path
1001 (starting with a '/' character), Git will interpret this
1002 as a file path and will try to write the trace messages
1005 Unsetting the variable, or setting it to empty, "0" or
1006 "false" (case insensitive) disables trace messages.
1008 'GIT_TRACE_PACK_ACCESS'::
1009 Enables trace messages for all accesses to any packs. For each
1010 access, the pack file name and an offset in the pack is
1011 recorded. This may be helpful for troubleshooting some
1012 pack-related performance problems.
1013 See 'GIT_TRACE' for available trace output options.
1015 'GIT_TRACE_PACKET'::
1016 Enables trace messages for all packets coming in or out of a
1017 given program. This can help with debugging object negotiation
1018 or other protocol issues. Tracing is turned off at a packet
1019 starting with "PACK" (but see 'GIT_TRACE_PACKFILE' below).
1020 See 'GIT_TRACE' for available trace output options.
1022 'GIT_TRACE_PACKFILE'::
1023 Enables tracing of packfiles sent or received by a
1024 given program. Unlike other trace output, this trace is
1025 verbatim: no headers, and no quoting of binary data. You almost
1026 certainly want to direct into a file (e.g.,
1027 `GIT_TRACE_PACKFILE=/tmp/my.pack`) rather than displaying it on
1028 the terminal or mixing it with other trace output.
1030 Note that this is currently only implemented for the client side
1031 of clones and fetches.
1033 'GIT_TRACE_PERFORMANCE'::
1034 Enables performance related trace messages, e.g. total execution
1035 time of each Git command.
1036 See 'GIT_TRACE' for available trace output options.
1039 Enables trace messages printing the .git, working tree and current
1040 working directory after Git has completed its setup phase.
1041 See 'GIT_TRACE' for available trace output options.
1043 'GIT_TRACE_SHALLOW'::
1044 Enables trace messages that can help debugging fetching /
1045 cloning of shallow repositories.
1046 See 'GIT_TRACE' for available trace output options.
1048 GIT_LITERAL_PATHSPECS::
1049 Setting this variable to `1` will cause Git to treat all
1050 pathspecs literally, rather than as glob patterns. For example,
1051 running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
1052 for commits that touch the path `*.c`, not any paths that the
1053 glob `*.c` matches. You might want this if you are feeding
1054 literal paths to Git (e.g., paths previously given to you by
1055 `git ls-tree`, `--raw` diff output, etc).
1057 GIT_GLOB_PATHSPECS::
1058 Setting this variable to `1` will cause Git to treat all
1059 pathspecs as glob patterns (aka "glob" magic).
1061 GIT_NOGLOB_PATHSPECS::
1062 Setting this variable to `1` will cause Git to treat all
1063 pathspecs as literal (aka "literal" magic).
1065 GIT_ICASE_PATHSPECS::
1066 Setting this variable to `1` will cause Git to treat all
1067 pathspecs as case-insensitive.
1069 'GIT_REFLOG_ACTION'::
1070 When a ref is updated, reflog entries are created to keep
1071 track of the reason why the ref was updated (which is
1072 typically the name of the high-level command that updated
1073 the ref), in addition to the old and new values of the ref.
1074 A scripted Porcelain command can use set_reflog_action
1075 helper function in `git-sh-setup` to set its name to this
1076 variable when it is invoked as the top level command by the
1077 end user, to be recorded in the body of the reflog.
1079 `GIT_REF_PARANOIA`::
1080 If set to `1`, include broken or badly named refs when iterating
1081 over lists of refs. In a normal, non-corrupted repository, this
1082 does nothing. However, enabling it may help git to detect and
1083 abort some operations in the presence of broken refs. Git sets
1084 this variable automatically when performing destructive
1085 operations like linkgit:git-prune[1]. You should not need to set
1086 it yourself unless you want to be paranoid about making sure
1087 an operation has touched every ref (e.g., because you are
1088 cloning a repository to make a backup).
1091 Discussion[[Discussion]]
1092 ------------------------
1094 More detail on the following is available from the
1095 link:user-manual.html#git-concepts[Git concepts chapter of the
1096 user-manual] and linkgit:gitcore-tutorial[7].
1098 A Git project normally consists of a working directory with a ".git"
1099 subdirectory at the top level. The .git directory contains, among other
1100 things, a compressed object database representing the complete history
1101 of the project, an "index" file which links that history to the current
1102 contents of the working tree, and named pointers into that history such
1103 as tags and branch heads.
1105 The object database contains objects of three main types: blobs, which
1106 hold file data; trees, which point to blobs and other trees to build up
1107 directory hierarchies; and commits, which each reference a single tree
1108 and some number of parent commits.
1110 The commit, equivalent to what other systems call a "changeset" or
1111 "version", represents a step in the project's history, and each parent
1112 represents an immediately preceding step. Commits with more than one
1113 parent represent merges of independent lines of development.
1115 All objects are named by the SHA-1 hash of their contents, normally
1116 written as a string of 40 hex digits. Such names are globally unique.
1117 The entire history leading up to a commit can be vouched for by signing
1118 just that commit. A fourth object type, the tag, is provided for this
1121 When first created, objects are stored in individual files, but for
1122 efficiency may later be compressed together into "pack files".
1124 Named pointers called refs mark interesting points in history. A ref
1125 may contain the SHA-1 name of an object or the name of another ref. Refs
1126 with names beginning `ref/head/` contain the SHA-1 name of the most
1127 recent commit (or "head") of a branch under development. SHA-1 names of
1128 tags of interest are stored under `ref/tags/`. A special ref named
1129 `HEAD` contains the name of the currently checked-out branch.
1131 The index file is initialized with a list of all paths and, for each
1132 path, a blob object and a set of attributes. The blob object represents
1133 the contents of the file as of the head of the current branch. The
1134 attributes (last modified time, size, etc.) are taken from the
1135 corresponding file in the working tree. Subsequent changes to the
1136 working tree can be found by comparing these attributes. The index may
1137 be updated with new content, and new commits may be created from the
1138 content stored in the index.
1140 The index is also capable of storing multiple entries (called "stages")
1141 for a given pathname. These stages are used to hold the various
1142 unmerged version of a file when a merge is in progress.
1144 FURTHER DOCUMENTATION
1145 ---------------------
1147 See the references in the "description" section to get started
1148 using Git. The following is probably more detail than necessary
1149 for a first-time user.
1151 The link:user-manual.html#git-concepts[Git concepts chapter of the
1152 user-manual] and linkgit:gitcore-tutorial[7] both provide
1153 introductions to the underlying Git architecture.
1155 See linkgit:gitworkflows[7] for an overview of recommended workflows.
1157 See also the link:howto-index.html[howto] documents for some useful
1160 The internals are documented in the
1161 link:technical/api-index.html[Git API documentation].
1163 Users migrating from CVS may also want to
1164 read linkgit:gitcvs-migration[7].
1169 Git was started by Linus Torvalds, and is currently maintained by Junio
1170 C Hamano. Numerous contributions have come from the Git mailing list
1171 <git@vger.kernel.org>. http://www.openhub.net/p/git/contributors/summary
1172 gives you a more complete list of contributors.
1174 If you have a clone of git.git itself, the
1175 output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1176 the authors for specific parts of the project.
1181 Report bugs to the Git mailing list <git@vger.kernel.org> where the
1182 development and maintenance is primarily done. You do not have to be
1183 subscribed to the list to send a message there.
1187 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
1188 linkgit:giteveryday[7], linkgit:gitcvs-migration[7],
1189 linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
1190 linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1191 linkgit:gitworkflows[7]
1195 Part of the linkgit:git[1] suite