Sync with 2.2.3
[git] / Documentation / git.txt
1 git(1)
2 ======
3
4 NAME
5 ----
6 git - the stupid content tracker
7
8
9 SYNOPSIS
10 --------
11 [verse]
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>]
16     <command> [<args>]
17
18 DESCRIPTION
19 -----------
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.
23
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.
28
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.
33
34 Formatted and hyperlinked version of the latest Git documentation
35 can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
36
37 ifdef::stalenotes[]
38 [NOTE]
39 ============
40
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:
45
46 * link:v2.3.8/git.html[documentation for release 2.3.8]
47
48 * release notes for
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].
58
59 * link:v2.2.3/git.html[documentation for release 2.2.3]
60
61 * release notes for
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].
66
67 * link:v2.1.4/git.html[documentation for release 2.1.4]
68
69 * release notes for
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].
75
76 * link:v2.0.5/git.html[documentation for release 2.0.5]
77
78 * release notes for
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].
85
86 * link:v1.9.5/git.html[documentation for release 1.9.5]
87
88 * release notes for
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].
95
96 * link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
97
98 * release notes for
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].
106
107 * link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
108
109 * release notes for
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].
116
117 * link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
118
119 * release notes for
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].
125
126 * link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
127
128 * release notes for
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].
133
134 * link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
135
136 * release notes for
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].
144
145 * link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
146
147 * release notes for
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].
152
153 * link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
154
155 * release notes for
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].
161
162 * link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
163
164 * release notes for
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].
173
174 * link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
175
176 * release notes for
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].
183
184 * link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
185
186 * release notes for
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].
195
196 * link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
197
198 * release notes for
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].
206
207 * link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
208
209 * release notes for
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].
218
219 * link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
220
221 * release notes for
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].
229
230 * link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
231
232 * release notes for
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].
238
239 * link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
240
241 * release notes for
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].
248
249 * link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
250
251 * release notes for
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].
258
259 * link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
260
261 * release notes for
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].
268
269 * link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
270
271 * release notes for
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].
277
278 * link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
279
280 * release notes for
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].
291
292 * link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
293
294 * release notes for
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].
299
300 * link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
301
302 * release notes for
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].
313
314 * link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
315
316 * release notes for
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].
323
324 * link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
325
326 * release notes for
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].
332
333 * release notes for
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].
340
341 * link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
342
343 * release notes for
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].
348
349 * link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
350
351 * release notes for
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].
359
360 * link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
361
362 * release notes for
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].
370
371 * link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
372
373 * release notes for
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].
381
382 * link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
383
384 * release notes for
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].
393
394 * link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
395
396 * release notes for
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].
406
407 * link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
408
409 * release notes for
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].
416
417 * link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
418
419 * release notes for
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].
427
428 * link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
429
430 * release notes for
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].
438
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].
443
444 ============
445
446 endif::stalenotes[]
447
448 OPTIONS
449 -------
450 --version::
451         Prints the Git suite version that the 'git' program came from.
452
453 --help::
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.
458 +
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
462 help ...`.
463
464 -C <path>::
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
468         <path>`.
469 +
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:
474
475     git --git-dir=a.git --work-tree=b -C c status
476     git --git-dir=c/a.git --work-tree=c/b status
477
478 -c <name>=<value>::
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).
483 +
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.
488
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.
494
495 --html-path::
496         Print the path, without trailing slash, where Git's HTML
497         documentation is installed and exit.
498
499 --man-path::
500         Print the manpath (see `man(1)`) for the man pages for
501         this version of Git and exit.
502
503 --info-path::
504         Print the path where the Info files documenting this
505         version of Git are installed and exit.
506
507 -p::
508 --paginate::
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
512         below).
513
514 --no-pager::
515         Do not pipe Git output into a pager.
516
517 --git-dir=<path>::
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.
521
522 --work-tree=<path>::
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).
529
530 --namespace=<path>::
531         Set the Git namespace.  See linkgit:gitnamespaces[7] for more
532         details.  Equivalent to setting the `GIT_NAMESPACE` environment
533         variable.
534
535 --bare::
536         Treat the repository as a bare repository.  If GIT_DIR
537         environment is not set, it is set to the current working
538         directory.
539
540 --no-replace-objects::
541         Do not use replacement refs to replace Git objects. See
542         linkgit:git-replace[1] for more information.
543
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
547         variable to `1`.
548
549 --glob-pathspecs::
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
553         magic ":(literal)"
554
555 --noglob-pathspecs::
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
559         magic ":(glob)"
560
561 --icase-pathspecs::
562         Add "icase" magic to all pathspec. This is equivalent to setting
563         the `GIT_ICASE_PATHSPECS` environment variable to `1`.
564
565 GIT COMMANDS
566 ------------
567
568 We divide Git into high level ("porcelain") commands and low level
569 ("plumbing") commands.
570
571 High-level commands (porcelain)
572 -------------------------------
573
574 We separate the porcelain commands into the main commands and some
575 ancillary user utilities.
576
577 Main porcelain commands
578 ~~~~~~~~~~~~~~~~~~~~~~~
579
580 include::cmds-mainporcelain.txt[]
581
582 Ancillary Commands
583 ~~~~~~~~~~~~~~~~~~
584 Manipulators:
585
586 include::cmds-ancillarymanipulators.txt[]
587
588 Interrogators:
589
590 include::cmds-ancillaryinterrogators.txt[]
591
592
593 Interacting with Others
594 ~~~~~~~~~~~~~~~~~~~~~~~
595
596 These commands are to interact with foreign SCM and with other
597 people via patch over e-mail.
598
599 include::cmds-foreignscminterface.txt[]
600
601
602 Low-level commands (plumbing)
603 -----------------------------
604
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].
610
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
616 end user experience.
617
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
622 repositories.
623
624
625 Manipulation commands
626 ~~~~~~~~~~~~~~~~~~~~~
627
628 include::cmds-plumbingmanipulators.txt[]
629
630
631 Interrogation commands
632 ~~~~~~~~~~~~~~~~~~~~~~
633
634 include::cmds-plumbinginterrogators.txt[]
635
636 In general, the interrogate commands do not touch the files in
637 the working tree.
638
639
640 Synching repositories
641 ~~~~~~~~~~~~~~~~~~~~~
642
643 include::cmds-synchingrepositories.txt[]
644
645 The following are helper commands used by the above; end users
646 typically do not use them directly.
647
648 include::cmds-synchelpers.txt[]
649
650
651 Internal helper commands
652 ~~~~~~~~~~~~~~~~~~~~~~~~
653
654 These are internal helper commands used by other commands; end
655 users typically do not use them directly.
656
657 include::cmds-purehelpers.txt[]
658
659
660 Configuration Mechanism
661 -----------------------
662
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
665 like this:
666
667 ------------
668 #
669 # A '#' or ';' character indicates a comment.
670 #
671
672 ; core variables
673 [core]
674         ; Don't trust file modes
675         filemode = false
676
677 ; user identity
678 [user]
679         name = "Junio C Hamano"
680         email = "gitster@pobox.com"
681
682 ------------
683
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.
687
688
689 Identifier Terminology
690 ----------------------
691 <object>::
692         Indicates the object name for any type of object.
693
694 <blob>::
695         Indicates a blob object name.
696
697 <tree>::
698         Indicates a tree object name.
699
700 <commit>::
701         Indicates a commit object name.
702
703 <tree-ish>::
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>.
708
709 <commit-ish>::
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>.
714
715 <type>::
716         Indicates that an object type is required.
717         Currently one of: `blob`, `tree`, `commit`, or `tag`.
718
719 <file>::
720         Indicates a filename - almost always relative to the
721         root of the tree structure `GIT_INDEX_FILE` describes.
722
723 Symbolic Identifiers
724 --------------------
725 Any Git command accepting any <object> can also use the following
726 symbolic notation:
727
728 HEAD::
729         indicates the head of the current branch.
730
731 <tag>::
732         a valid tag 'name'
733         (i.e. a `refs/tags/<tag>` reference).
734
735 <head>::
736         a valid head 'name'
737         (i.e. a `refs/heads/<head>` reference).
738
739 For a more complete list of ways to spell object names, see
740 "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
741
742
743 File/Directory Structure
744 ------------------------
745
746 Please see the linkgit:gitrepository-layout[5] document.
747
748 Read linkgit:githooks[5] for more details about each hook.
749
750 Higher level SCMs may provide and manage additional information in the
751 `$GIT_DIR`.
752
753
754 Terminology
755 -----------
756 Please see linkgit:gitglossary[7].
757
758
759 Environment Variables
760 ---------------------
761 Various Git commands use the following environment variables:
762
763 The Git Repository
764 ~~~~~~~~~~~~~~~~~~
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.
768
769 'GIT_INDEX_FILE'::
770         This environment allows the specification of an alternate
771         index file. If not specified, the default of `$GIT_DIR/index`
772         is used.
773
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.
779
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`
784         directory is used.
785
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.
792
793 'GIT_DIR'::
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.
798
799 'GIT_WORK_TREE'::
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.
803
804 'GIT_NAMESPACE'::
805         Set the Git namespace; see linkgit:gitnamespaces[7] for details.
806         The '--namespace' command-line option also sets this value.
807
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;
820         e.g.,
821         'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
822
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
831         command line.
832
833 Git Commits
834 ~~~~~~~~~~~
835 'GIT_AUTHOR_NAME'::
836 'GIT_AUTHOR_EMAIL'::
837 'GIT_AUTHOR_DATE'::
838 'GIT_COMMITTER_NAME'::
839 'GIT_COMMITTER_EMAIL'::
840 'GIT_COMMITTER_DATE'::
841 'EMAIL'::
842         see linkgit:git-commit-tree[1]
843
844 Git Diffs
845 ~~~~~~~~~
846 'GIT_DIFF_OPTS'::
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.
851
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:
857
858         path old-file old-hex old-mode new-file new-hex new-mode
859 +
860 where:
861
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.
866 +
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.
872 +
873 For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
874 parameter, <path>.
875 +
876 For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
877 'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
878
879 'GIT_DIFF_PATH_COUNTER'::
880         A 1-based counter incremented by one for every path.
881
882 'GIT_DIFF_PATH_TOTAL'::
883         The total number of paths.
884
885 other
886 ~~~~~
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]
891
892 'GIT_PAGER'::
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].
897
898 'GIT_EDITOR'::
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].
903
904 'GIT_SSH'::
905 'GIT_SSH_COMMAND'::
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.
914 +
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
919 needed).
920 +
921 Usually it is easier to configure any desired options through your
922 personal `.ssh/config` file.  Please consult your ssh documentation
923 for further details.
924
925 'GIT_ASKPASS'::
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].
931
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).
935
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.
943
944 'GIT_FLUSH'::
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
949         flushed. If this
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.
954
955 'GIT_TRACE'::
956         Enables general trace messages, e.g. alias expansion, built-in
957         command execution and external command execution.
958 +
959 If this variable is set to "1", "2" or "true" (comparison
960 is case insensitive), trace messages will be printed to
961 stderr.
962 +
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.
967 +
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
971 into it.
972 +
973 Unsetting the variable, or setting it to empty, "0" or
974 "false" (case insensitive) disables trace messages.
975
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.
982
983 'GIT_TRACE_PACKET'::
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.
989
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.
994
995 'GIT_TRACE_SETUP'::
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.
999
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.
1004
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).
1013
1014 GIT_GLOB_PATHSPECS::
1015         Setting this variable to `1` will cause Git to treat all
1016         pathspecs as glob patterns (aka "glob" magic).
1017
1018 GIT_NOGLOB_PATHSPECS::
1019         Setting this variable to `1` will cause Git to treat all
1020         pathspecs as literal (aka "literal" magic).
1021
1022 GIT_ICASE_PATHSPECS::
1023         Setting this variable to `1` will cause Git to treat all
1024         pathspecs as case-insensitive.
1025
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.
1035
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).
1046
1047
1048 Discussion[[Discussion]]
1049 ------------------------
1050
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].
1054
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.
1061
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.
1066
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.
1071
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
1076 purpose.
1077
1078 When first created, objects are stored in individual files, but for
1079 efficiency may later be compressed together into "pack files".
1080
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.
1087
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.
1096
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.
1100
1101 FURTHER DOCUMENTATION
1102 ---------------------
1103
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.
1107
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.
1111
1112 See linkgit:gitworkflows[7] for an overview of recommended workflows.
1113
1114 See also the link:howto-index.html[howto] documents for some useful
1115 examples.
1116
1117 The internals are documented in the
1118 link:technical/api-index.html[Git API documentation].
1119
1120 Users migrating from CVS may also want to
1121 read linkgit:gitcvs-migration[7].
1122
1123
1124 Authors
1125 -------
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.
1130
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.
1134
1135 Reporting Bugs
1136 --------------
1137
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.
1141
1142 SEE ALSO
1143 --------
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]
1149
1150 GIT
1151 ---
1152 Part of the linkgit:git[1] suite