summaryrefslogtreecommitdiffstats
path: root/man1/git.1
blob: 6d1c67c439b19140efa92a8f3fe70812b5d235a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
'\" t
.\"     Title: git
.\"    Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-24
.\"    Manual: Git Manual
.\"    Source: Git 2.45.0.rc1.1.g9f32d8da7a
.\"  Language: English
.\"
.TH "GIT" "1" "2024\-04\-24" "Git 2\&.45\&.0\&.rc1\&.1\&.g9f" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git \- the stupid content tracker
.SH "SYNOPSIS"
.sp
.nf
\fIgit\fR [\-v | \-\-version] [\-h | \-\-help] [\-C <path>] [\-c <name>=<value>]
    [\-\-exec\-path[=<path>]] [\-\-html\-path] [\-\-man\-path] [\-\-info\-path]
    [\-p|\-\-paginate|\-P|\-\-no\-pager] [\-\-no\-replace\-objects] [\-\-bare]
    [\-\-git\-dir=<path>] [\-\-work\-tree=<path>] [\-\-namespace=<name>]
    [\-\-config\-env=<name>=<envvar>] <command> [<args>]
.fi
.sp
.SH "DESCRIPTION"
.sp
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high\-level operations and full access to internals\&.
.sp
See \fBgittutorial\fR(7) to get started, then see \fBgiteveryday\fR(7) for a useful minimum set of commands\&. The \m[blue]\fBGit User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2 has a more in\-depth introduction\&.
.sp
After you mastered the basic concepts, you can come back to this page to learn what commands Git offers\&. You can learn more about individual Git commands with "git help command"\&. \fBgitcli\fR(7) manual page gives you an overview of the command\-line command syntax\&.
.sp
A formatted and hyperlinked copy of the latest Git documentation can be viewed at \m[blue]\fBhttps://git\&.github\&.io/htmldocs/git\&.html\fR\m[] or \m[blue]\fBhttps://git\-scm\&.com/docs\fR\m[]\&.
.SH "OPTIONS"
.PP
\-v, \-\-version
.RS 4
Prints the Git suite version that the
\fIgit\fR
program came from\&.
.sp
This option is internally converted to
\fBgit version \&.\&.\&.\fR
and accepts the same options as the
\fBgit-version\fR(1)
command\&. If
\fB\-\-help\fR
is also given, it takes precedence over
\fB\-\-version\fR\&.
.RE
.PP
\-h, \-\-help
.RS 4
Prints the synopsis and a list of the most commonly used commands\&. If the option
\fB\-\-all\fR
or
\fB\-a\fR
is given then all available commands are printed\&. If a Git command is named this option will bring up the manual page for that command\&.
.sp
Other options are available to control how the manual page is displayed\&. See
\fBgit-help\fR(1)
for more information, because
\fBgit \-\-help \&.\&.\&.\fR
is converted internally into
\fBgit help \&.\&.\&.\fR\&.
.RE
.PP
\-C <path>
.RS 4
Run as if git was started in
\fI<path>\fR
instead of the current working directory\&. When multiple
\fB\-C\fR
options are given, each subsequent non\-absolute
\fB\-C <path>\fR
is interpreted relative to the preceding
\fB\-C <path>\fR\&. If
\fI<path>\fR
is present but empty, e\&.g\&.
\fB\-C ""\fR, then the current working directory is left unchanged\&.
.sp
This option affects options that expect path name like
\fB\-\-git\-dir\fR
and
\fB\-\-work\-tree\fR
in that their interpretations of the path names would be made relative to the working directory caused by the
\fB\-C\fR
option\&. For example the following invocations are equivalent:
.sp
.if n \{\
.RS 4
.\}
.nf
git \-\-git\-dir=a\&.git \-\-work\-tree=b \-C c status
git \-\-git\-dir=c/a\&.git \-\-work\-tree=c/b status
.fi
.if n \{\
.RE
.\}
.RE
.PP
\-c <name>=<value>
.RS 4
Pass a configuration parameter to the command\&. The value given will override values from configuration files\&. The <name> is expected in the same format as listed by
\fIgit config\fR
(subkeys separated by dots)\&.
.sp
Note that omitting the
\fB=\fR
in
\fBgit \-c foo\&.bar \&.\&.\&.\fR
is allowed and sets
\fBfoo\&.bar\fR
to the boolean true value (just like
\fB[foo]bar\fR
would in a config file)\&. Including the equals but with an empty value (like
\fBgit \-c foo\&.bar= \&.\&.\&.\fR) sets
\fBfoo\&.bar\fR
to the empty string which
\fBgit config \-\-type=bool\fR
will convert to
\fBfalse\fR\&.
.RE
.PP
\-\-config\-env=<name>=<envvar>
.RS 4
Like
\fB\-c <name>=<value>\fR, give configuration variable
\fI<name>\fR
a value, where <envvar> is the name of an environment variable from which to retrieve the value\&. Unlike
\fB\-c\fR
there is no shortcut for directly setting the value to an empty string, instead the environment variable itself must be set to the empty string\&. It is an error if the
\fB<envvar>\fR
does not exist in the environment\&.
\fB<envvar>\fR
may not contain an equals sign to avoid ambiguity with
\fB<name>\fR
containing one\&.
.sp
This is useful for cases where you want to pass transitory configuration options to git, but are doing so on operating systems where other processes might be able to read your command line (e\&.g\&.
\fB/proc/self/cmdline\fR), but not your environment (e\&.g\&.
\fB/proc/self/environ\fR)\&. That behavior is the default on Linux, but may not be on your system\&.
.sp
Note that this might add security for variables such as
\fBhttp\&.extraHeader\fR
where the sensitive information is part of the value, but not e\&.g\&.
\fBurl\&.<base>\&.insteadOf\fR
where the sensitive information can be part of the key\&.
.RE
.PP
\-\-exec\-path[=<path>]
.RS 4
Path to wherever your core Git programs are installed\&. This can also be controlled by setting the GIT_EXEC_PATH environment variable\&. If no path is given,
\fIgit\fR
will print the current setting and then exit\&.
.RE
.PP
\-\-html\-path
.RS 4
Print the path, without trailing slash, where Git\(cqs HTML documentation is installed and exit\&.
.RE
.PP
\-\-man\-path
.RS 4
Print the manpath (see
\fBman(1)\fR) for the man pages for this version of Git and exit\&.
.RE
.PP
\-\-info\-path
.RS 4
Print the path where the Info files documenting this version of Git are installed and exit\&.
.RE
.PP
\-p, \-\-paginate
.RS 4
Pipe all output into
\fIless\fR
(or if set, $PAGER) if standard output is a terminal\&. This overrides the
\fBpager\&.<cmd>\fR
configuration options (see the "Configuration Mechanism" section below)\&.
.RE
.PP
\-P, \-\-no\-pager
.RS 4
Do not pipe Git output into a pager\&.
.RE
.PP
\-\-git\-dir=<path>
.RS 4
Set the path to the repository ("\&.git" directory)\&. This can also be controlled by setting the
\fBGIT_DIR\fR
environment variable\&. It can be an absolute path or relative path to current working directory\&.
.sp
Specifying the location of the "\&.git" directory using this option (or
\fBGIT_DIR\fR
environment variable) turns off the repository discovery that tries to find a directory with "\&.git" subdirectory (which is how the repository and the top\-level of the working tree are discovered), and tells Git that you are at the top level of the working tree\&. If you are not at the top\-level directory of the working tree, you should tell Git where the top\-level of the working tree is, with the
\fB\-\-work\-tree=<path>\fR
option (or
\fBGIT_WORK_TREE\fR
environment variable)
.sp
If you just want to run git as if it was started in
\fB<path>\fR
then use
\fBgit \-C <path>\fR\&.
.RE
.PP
\-\-work\-tree=<path>
.RS 4
Set the path to the working tree\&. It can be an absolute path or a path relative to the current working directory\&. This can also be controlled by setting the GIT_WORK_TREE environment variable and the core\&.worktree configuration variable (see core\&.worktree in
\fBgit-config\fR(1)
for a more detailed discussion)\&.
.RE
.PP
\-\-namespace=<path>
.RS 4
Set the Git namespace\&. See
\fBgitnamespaces\fR(7)
for more details\&. Equivalent to setting the
\fBGIT_NAMESPACE\fR
environment variable\&.
.RE
.PP
\-\-bare
.RS 4
Treat the repository as a bare repository\&. If GIT_DIR environment is not set, it is set to the current working directory\&.
.RE
.PP
\-\-no\-replace\-objects
.RS 4
Do not use replacement refs to replace Git objects\&. This is equivalent to exporting the
\fBGIT_NO_REPLACE_OBJECTS\fR
environment variable with any value\&. See
\fBgit-replace\fR(1)
for more information\&.
.RE
.PP
\-\-no\-lazy\-fetch
.RS 4
Do not fetch missing objects from the promisor remote on demand\&. Useful together with
\fBgit cat\-file \-e <object>\fR
to see if the object is locally available\&. This is equivalent to setting the
\fBGIT_NO_LAZY_FETCH\fR
environment variable to
\fB1\fR\&.
.RE
.PP
\-\-literal\-pathspecs
.RS 4
Treat pathspecs literally (i\&.e\&. no globbing, no pathspec magic)\&. This is equivalent to setting the
\fBGIT_LITERAL_PATHSPECS\fR
environment variable to
\fB1\fR\&.
.RE
.PP
\-\-glob\-pathspecs
.RS 4
Add "glob" magic to all pathspec\&. This is equivalent to setting the
\fBGIT_GLOB_PATHSPECS\fR
environment variable to
\fB1\fR\&. Disabling globbing on individual pathspecs can be done using pathspec magic ":(literal)"
.RE
.PP
\-\-noglob\-pathspecs
.RS 4
Add "literal" magic to all pathspec\&. This is equivalent to setting the
\fBGIT_NOGLOB_PATHSPECS\fR
environment variable to
\fB1\fR\&. Enabling globbing on individual pathspecs can be done using pathspec magic ":(glob)"
.RE
.PP
\-\-icase\-pathspecs
.RS 4
Add "icase" magic to all pathspec\&. This is equivalent to setting the
\fBGIT_ICASE_PATHSPECS\fR
environment variable to
\fB1\fR\&.
.RE
.PP
\-\-no\-optional\-locks
.RS 4
Do not perform optional operations that require locks\&. This is equivalent to setting the
\fBGIT_OPTIONAL_LOCKS\fR
to
\fB0\fR\&.
.RE
.PP
\-\-list\-cmds=<group>[,<group>\&...]
.RS 4
List commands by group\&. This is an internal/experimental option and may change or be removed in the future\&. Supported groups are: builtins, parseopt (builtin commands that use parse\-options), main (all commands in libexec directory), others (all other commands in
\fB$PATH\fR
that have git\- prefix), list\-<category> (see categories in command\-list\&.txt), nohelpers (exclude helper commands), alias and config (retrieve command list from config variable completion\&.commands)
.RE
.PP
\-\-attr\-source=<tree\-ish>
.RS 4
Read gitattributes from <tree\-ish> instead of the worktree\&. See
\fBgitattributes\fR(5)\&. This is equivalent to setting the
\fBGIT_ATTR_SOURCE\fR
environment variable\&.
.RE
.SH "GIT COMMANDS"
.sp
We divide Git into high level ("porcelain") commands and low level ("plumbing") commands\&.
.SH "HIGH\-LEVEL COMMANDS (PORCELAIN)"
.sp
We separate the porcelain commands into the main commands and some ancillary user utilities\&.
.SS "Main porcelain commands"
.PP
\fBgit-add\fR(1)
.RS 4
Add file contents to the index\&.
.RE
.PP
\fBgit-am\fR(1)
.RS 4
Apply a series of patches from a mailbox\&.
.RE
.PP
\fBgit-archive\fR(1)
.RS 4
Create an archive of files from a named tree\&.
.RE
.PP
\fBgit-bisect\fR(1)
.RS 4
Use binary search to find the commit that introduced a bug\&.
.RE
.PP
\fBgit-branch\fR(1)
.RS 4
List, create, or delete branches\&.
.RE
.PP
\fBgit-bundle\fR(1)
.RS 4
Move objects and refs by archive\&.
.RE
.PP
\fBgit-checkout\fR(1)
.RS 4
Switch branches or restore working tree files\&.
.RE
.PP
\fBgit-cherry-pick\fR(1)
.RS 4
Apply the changes introduced by some existing commits\&.
.RE
.PP
\fBgit-citool\fR(1)
.RS 4
Graphical alternative to git\-commit\&.
.RE
.PP
\fBgit-clean\fR(1)
.RS 4
Remove untracked files from the working tree\&.
.RE
.PP
\fBgit-clone\fR(1)
.RS 4
Clone a repository into a new directory\&.
.RE
.PP
\fBgit-commit\fR(1)
.RS 4
Record changes to the repository\&.
.RE
.PP
\fBgit-describe\fR(1)
.RS 4
Give an object a human readable name based on an available ref\&.
.RE
.PP
\fBgit-diff\fR(1)
.RS 4
Show changes between commits, commit and working tree, etc\&.
.RE
.PP
\fBgit-fetch\fR(1)
.RS 4
Download objects and refs from another repository\&.
.RE
.PP
\fBgit-format-patch\fR(1)
.RS 4
Prepare patches for e\-mail submission\&.
.RE
.PP
\fBgit-gc\fR(1)
.RS 4
Cleanup unnecessary files and optimize the local repository\&.
.RE
.PP
\fBgit-grep\fR(1)
.RS 4
Print lines matching a pattern\&.
.RE
.PP
\fBgit-gui\fR(1)
.RS 4
A portable graphical interface to Git\&.
.RE
.PP
\fBgit-init\fR(1)
.RS 4
Create an empty Git repository or reinitialize an existing one\&.
.RE
.PP
\fBgit-log\fR(1)
.RS 4
Show commit logs\&.
.RE
.PP
\fBgit-maintenance\fR(1)
.RS 4
Run tasks to optimize Git repository data\&.
.RE
.PP
\fBgit-merge\fR(1)
.RS 4
Join two or more development histories together\&.
.RE
.PP
\fBgit-mv\fR(1)
.RS 4
Move or rename a file, a directory, or a symlink\&.
.RE
.PP
\fBgit-notes\fR(1)
.RS 4
Add or inspect object notes\&.
.RE
.PP
\fBgit-pull\fR(1)
.RS 4
Fetch from and integrate with another repository or a local branch\&.
.RE
.PP
\fBgit-push\fR(1)
.RS 4
Update remote refs along with associated objects\&.
.RE
.PP
\fBgit-range-diff\fR(1)
.RS 4
Compare two commit ranges (e\&.g\&. two versions of a branch)\&.
.RE
.PP
\fBgit-rebase\fR(1)
.RS 4
Reapply commits on top of another base tip\&.
.RE
.PP
\fBgit-reset\fR(1)
.RS 4
Reset current HEAD to the specified state\&.
.RE
.PP
\fBgit-restore\fR(1)
.RS 4
Restore working tree files\&.
.RE
.PP
\fBgit-revert\fR(1)
.RS 4
Revert some existing commits\&.
.RE
.PP
\fBgit-rm\fR(1)
.RS 4
Remove files from the working tree and from the index\&.
.RE
.PP
\fBgit-shortlog\fR(1)
.RS 4
Summarize
\fIgit log\fR
output\&.
.RE
.PP
\fBgit-show\fR(1)
.RS 4
Show various types of objects\&.
.RE
.PP
\fBgit-sparse-checkout\fR(1)
.RS 4
Reduce your working tree to a subset of tracked files\&.
.RE
.PP
\fBgit-stash\fR(1)
.RS 4
Stash the changes in a dirty working directory away\&.
.RE
.PP
\fBgit-status\fR(1)
.RS 4
Show the working tree status\&.
.RE
.PP
\fBgit-submodule\fR(1)
.RS 4
Initialize, update or inspect submodules\&.
.RE
.PP
\fBgit-switch\fR(1)
.RS 4
Switch branches\&.
.RE
.PP
\fBgit-tag\fR(1)
.RS 4
Create, list, delete or verify a tag object signed with GPG\&.
.RE
.PP
\fBgit-worktree\fR(1)
.RS 4
Manage multiple working trees\&.
.RE
.PP
\fBgitk\fR(1)
.RS 4
The Git repository browser\&.
.RE
.PP
\fBscalar\fR(1)
.RS 4
A tool for managing large Git repositories\&.
.RE
.SS "Ancillary Commands"
.sp
Manipulators:
.PP
\fBgit-config\fR(1)
.RS 4
Get and set repository or global options\&.
.RE
.PP
\fBgit-fast-export\fR(1)
.RS 4
Git data exporter\&.
.RE
.PP
\fBgit-fast-import\fR(1)
.RS 4
Backend for fast Git data importers\&.
.RE
.PP
\fBgit-filter-branch\fR(1)
.RS 4
Rewrite branches\&.
.RE
.PP
\fBgit-mergetool\fR(1)
.RS 4
Run merge conflict resolution tools to resolve merge conflicts\&.
.RE
.PP
\fBgit-pack-refs\fR(1)
.RS 4
Pack heads and tags for efficient repository access\&.
.RE
.PP
\fBgit-prune\fR(1)
.RS 4
Prune all unreachable objects from the object database\&.
.RE
.PP
\fBgit-reflog\fR(1)
.RS 4
Manage reflog information\&.
.RE
.PP
\fBgit-remote\fR(1)
.RS 4
Manage set of tracked repositories\&.
.RE
.PP
\fBgit-repack\fR(1)
.RS 4
Pack unpacked objects in a repository\&.
.RE
.PP
\fBgit-replace\fR(1)
.RS 4
Create, list, delete refs to replace objects\&.
.RE
.sp
Interrogators:
.PP
\fBgit-annotate\fR(1)
.RS 4
Annotate file lines with commit information\&.
.RE
.PP
\fBgit-blame\fR(1)
.RS 4
Show what revision and author last modified each line of a file\&.
.RE
.PP
\fBgit-bugreport\fR(1)
.RS 4
Collect information for user to file a bug report\&.
.RE
.PP
\fBgit-count-objects\fR(1)
.RS 4
Count unpacked number of objects and their disk consumption\&.
.RE
.PP
\fBgit-diagnose\fR(1)
.RS 4
Generate a zip archive of diagnostic information\&.
.RE
.PP
\fBgit-difftool\fR(1)
.RS 4
Show changes using common diff tools\&.
.RE
.PP
\fBgit-fsck\fR(1)
.RS 4
Verifies the connectivity and validity of the objects in the database\&.
.RE
.PP
\fBgit-help\fR(1)
.RS 4
Display help information about Git\&.
.RE
.PP
\fBgit-instaweb\fR(1)
.RS 4
Instantly browse your working repository in gitweb\&.
.RE
.PP
\fBgit-merge-tree\fR(1)
.RS 4
Perform merge without touching index or working tree\&.
.RE
.PP
\fBgit-rerere\fR(1)
.RS 4
Reuse recorded resolution of conflicted merges\&.
.RE
.PP
\fBgit-show-branch\fR(1)
.RS 4
Show branches and their commits\&.
.RE
.PP
\fBgit-verify-commit\fR(1)
.RS 4
Check the GPG signature of commits\&.
.RE
.PP
\fBgit-verify-tag\fR(1)
.RS 4
Check the GPG signature of tags\&.
.RE
.PP
\fBgit-version\fR(1)
.RS 4
Display version information about Git\&.
.RE
.PP
\fBgit-whatchanged\fR(1)
.RS 4
Show logs with differences each commit introduces\&.
.RE
.PP
\fBgitweb\fR(1)
.RS 4
Git web interface (web frontend to Git repositories)\&.
.RE
.SS "Interacting with Others"
.sp
These commands are to interact with foreign SCM and with other people via patch over e\-mail\&.
.PP
\fBgit-archimport\fR(1)
.RS 4
Import a GNU Arch repository into Git\&.
.RE
.PP
\fBgit-cvsexportcommit\fR(1)
.RS 4
Export a single commit to a CVS checkout\&.
.RE
.PP
\fBgit-cvsimport\fR(1)
.RS 4
Salvage your data out of another SCM people love to hate\&.
.RE
.PP
\fBgit-cvsserver\fR(1)
.RS 4
A CVS server emulator for Git\&.
.RE
.PP
\fBgit-imap-send\fR(1)
.RS 4
Send a collection of patches from stdin to an IMAP folder\&.
.RE
.PP
\fBgit-p4\fR(1)
.RS 4
Import from and submit to Perforce repositories\&.
.RE
.PP
\fBgit-quiltimport\fR(1)
.RS 4
Applies a quilt patchset onto the current branch\&.
.RE
.PP
\fBgit-request-pull\fR(1)
.RS 4
Generates a summary of pending changes\&.
.RE
.PP
\fBgit-send-email\fR(1)
.RS 4
Send a collection of patches as emails\&.
.RE
.PP
\fBgit-svn\fR(1)
.RS 4
Bidirectional operation between a Subversion repository and Git\&.
.RE
.SS "Reset, restore and revert"
.sp
There are three commands with similar names: \fBgit reset\fR, \fBgit restore\fR and \fBgit revert\fR\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBgit-revert\fR(1)
is about making a new commit that reverts the changes made by other commits\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBgit-restore\fR(1)
is about restoring files in the working tree from either the index or another commit\&. This command does not update your branch\&. The command can also be used to restore files in the index from another commit\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBgit-reset\fR(1)
is about updating your branch, moving the tip in order to add or remove commits from the branch\&. This operation changes the commit history\&.
.sp
\fBgit reset\fR
can also be used to restore the index, overlapping with
\fBgit restore\fR\&.
.RE
.SH "LOW\-LEVEL COMMANDS (PLUMBING)"
.sp
Although Git includes its own porcelain layer, its low\-level commands are sufficient to support development of alternative porcelains\&. Developers of such porcelains might start by reading about \fBgit-update-index\fR(1) and \fBgit-read-tree\fR(1)\&.
.sp
The interface (input, output, set of options and the semantics) to these low\-level commands are meant to be a lot more stable than Porcelain level commands, because these commands are primarily for scripted use\&. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience\&.
.sp
The following description divides the low\-level commands into commands that manipulate objects (in the repository, index, and working tree), commands that interrogate and compare objects, and commands that move objects and references between repositories\&.
.SS "Manipulation commands"
.PP
\fBgit-apply\fR(1)
.RS 4
Apply a patch to files and/or to the index\&.
.RE
.PP
\fBgit-checkout-index\fR(1)
.RS 4
Copy files from the index to the working tree\&.
.RE
.PP
\fBgit-commit-graph\fR(1)
.RS 4
Write and verify Git commit\-graph files\&.
.RE
.PP
\fBgit-commit-tree\fR(1)
.RS 4
Create a new commit object\&.
.RE
.PP
\fBgit-hash-object\fR(1)
.RS 4
Compute object ID and optionally create an object from a file\&.
.RE
.PP
\fBgit-index-pack\fR(1)
.RS 4
Build pack index file for an existing packed archive\&.
.RE
.PP
\fBgit-merge-file\fR(1)
.RS 4
Run a three\-way file merge\&.
.RE
.PP
\fBgit-merge-index\fR(1)
.RS 4
Run a merge for files needing merging\&.
.RE
.PP
\fBgit-mktag\fR(1)
.RS 4
Creates a tag object with extra validation\&.
.RE
.PP
\fBgit-mktree\fR(1)
.RS 4
Build a tree\-object from ls\-tree formatted text\&.
.RE
.PP
\fBgit-multi-pack-index\fR(1)
.RS 4
Write and verify multi\-pack\-indexes\&.
.RE
.PP
\fBgit-pack-objects\fR(1)
.RS 4
Create a packed archive of objects\&.
.RE
.PP
\fBgit-prune-packed\fR(1)
.RS 4
Remove extra objects that are already in pack files\&.
.RE
.PP
\fBgit-read-tree\fR(1)
.RS 4
Reads tree information into the index\&.
.RE
.PP
\fBgit-replay\fR(1)
.RS 4
EXPERIMENTAL: Replay commits on a new base, works with bare repos too\&.
.RE
.PP
\fBgit-symbolic-ref\fR(1)
.RS 4
Read, modify and delete symbolic refs\&.
.RE
.PP
\fBgit-unpack-objects\fR(1)
.RS 4
Unpack objects from a packed archive\&.
.RE
.PP
\fBgit-update-index\fR(1)
.RS 4
Register file contents in the working tree to the index\&.
.RE
.PP
\fBgit-update-ref\fR(1)
.RS 4
Update the object name stored in a ref safely\&.
.RE
.PP
\fBgit-write-tree\fR(1)
.RS 4
Create a tree object from the current index\&.
.RE
.SS "Interrogation commands"
.PP
\fBgit-cat-file\fR(1)
.RS 4
Provide contents or details of repository objects\&.
.RE
.PP
\fBgit-cherry\fR(1)
.RS 4
Find commits yet to be applied to upstream\&.
.RE
.PP
\fBgit-diff-files\fR(1)
.RS 4
Compares files in the working tree and the index\&.
.RE
.PP
\fBgit-diff-index\fR(1)
.RS 4
Compare a tree to the working tree or index\&.
.RE
.PP
\fBgit-diff-tree\fR(1)
.RS 4
Compares the content and mode of blobs found via two tree objects\&.
.RE
.PP
\fBgit-for-each-ref\fR(1)
.RS 4
Output information on each ref\&.
.RE
.PP
\fBgit-for-each-repo\fR(1)
.RS 4
Run a Git command on a list of repositories\&.
.RE
.PP
\fBgit-get-tar-commit-id\fR(1)
.RS 4
Extract commit ID from an archive created using git\-archive\&.
.RE
.PP
\fBgit-ls-files\fR(1)
.RS 4
Show information about files in the index and the working tree\&.
.RE
.PP
\fBgit-ls-remote\fR(1)
.RS 4
List references in a remote repository\&.
.RE
.PP
\fBgit-ls-tree\fR(1)
.RS 4
List the contents of a tree object\&.
.RE
.PP
\fBgit-merge-base\fR(1)
.RS 4
Find as good common ancestors as possible for a merge\&.
.RE
.PP
\fBgit-name-rev\fR(1)
.RS 4
Find symbolic names for given revs\&.
.RE
.PP
\fBgit-pack-redundant\fR(1)
.RS 4
Find redundant pack files\&.
.RE
.PP
\fBgit-rev-list\fR(1)
.RS 4
Lists commit objects in reverse chronological order\&.
.RE
.PP
\fBgit-rev-parse\fR(1)
.RS 4
Pick out and massage parameters\&.
.RE
.PP
\fBgit-show-index\fR(1)
.RS 4
Show packed archive index\&.
.RE
.PP
\fBgit-show-ref\fR(1)
.RS 4
List references in a local repository\&.
.RE
.PP
\fBgit-unpack-file\fR(1)
.RS 4
Creates a temporary file with a blob\(cqs contents\&.
.RE
.PP
\fBgit-var\fR(1)
.RS 4
Show a Git logical variable\&.
.RE
.PP
\fBgit-verify-pack\fR(1)
.RS 4
Validate packed Git archive files\&.
.RE
.sp
In general, the interrogate commands do not touch the files in the working tree\&.
.SS "Syncing repositories"
.PP
\fBgit-daemon\fR(1)
.RS 4
A really simple server for Git repositories\&.
.RE
.PP
\fBgit-fetch-pack\fR(1)
.RS 4
Receive missing objects from another repository\&.
.RE
.PP
\fBgit-http-backend\fR(1)
.RS 4
Server side implementation of Git over HTTP\&.
.RE
.PP
\fBgit-send-pack\fR(1)
.RS 4
Push objects over Git protocol to another repository\&.
.RE
.PP
\fBgit-update-server-info\fR(1)
.RS 4
Update auxiliary info file to help dumb servers\&.
.RE
.sp
The following are helper commands used by the above; end users typically do not use them directly\&.
.PP
\fBgit-http-fetch\fR(1)
.RS 4
Download from a remote Git repository via HTTP\&.
.RE
.PP
\fBgit-http-push\fR(1)
.RS 4
Push objects over HTTP/DAV to another repository\&.
.RE
.PP
\fBgit-receive-pack\fR(1)
.RS 4
Receive what is pushed into the repository\&.
.RE
.PP
\fBgit-shell\fR(1)
.RS 4
Restricted login shell for Git\-only SSH access\&.
.RE
.PP
\fBgit-upload-archive\fR(1)
.RS 4
Send archive back to git\-archive\&.
.RE
.PP
\fBgit-upload-pack\fR(1)
.RS 4
Send objects packed back to git\-fetch\-pack\&.
.RE
.SS "Internal helper commands"
.sp
These are internal helper commands used by other commands; end users typically do not use them directly\&.
.PP
\fBgit-check-attr\fR(1)
.RS 4
Display gitattributes information\&.
.RE
.PP
\fBgit-check-ignore\fR(1)
.RS 4
Debug gitignore / exclude files\&.
.RE
.PP
\fBgit-check-mailmap\fR(1)
.RS 4
Show canonical names and email addresses of contacts\&.
.RE
.PP
\fBgit-check-ref-format\fR(1)
.RS 4
Ensures that a reference name is well formed\&.
.RE
.PP
\fBgit-column\fR(1)
.RS 4
Display data in columns\&.
.RE
.PP
\fBgit-credential\fR(1)
.RS 4
Retrieve and store user credentials\&.
.RE
.PP
\fBgit-credential-cache\fR(1)
.RS 4
Helper to temporarily store passwords in memory\&.
.RE
.PP
\fBgit-credential-store\fR(1)
.RS 4
Helper to store credentials on disk\&.
.RE
.PP
\fBgit-fmt-merge-msg\fR(1)
.RS 4
Produce a merge commit message\&.
.RE
.PP
\fBgit-hook\fR(1)
.RS 4
Run git hooks\&.
.RE
.PP
\fBgit-interpret-trailers\fR(1)
.RS 4
Add or parse structured information in commit messages\&.
.RE
.PP
\fBgit-mailinfo\fR(1)
.RS 4
Extracts patch and authorship from a single e\-mail message\&.
.RE
.PP
\fBgit-mailsplit\fR(1)
.RS 4
Simple UNIX mbox splitter program\&.
.RE
.PP
\fBgit-merge-one-file\fR(1)
.RS 4
The standard helper program to use with git\-merge\-index\&.
.RE
.PP
\fBgit-patch-id\fR(1)
.RS 4
Compute unique ID for a patch\&.
.RE
.PP
\fBgit-sh-i18n\fR(1)
.RS 4
Git\(cqs i18n setup code for shell scripts\&.
.RE
.PP
\fBgit-sh-setup\fR(1)
.RS 4
Common Git shell script setup code\&.
.RE
.PP
\fBgit-stripspace\fR(1)
.RS 4
Remove unnecessary whitespace\&.
.RE
.SH "GUIDES"
.sp
The following documentation pages are guides about Git concepts\&.
.PP
\fBgitcore-tutorial\fR(7)
.RS 4
A Git core tutorial for developers\&.
.RE
.PP
\fBgitcredentials\fR(7)
.RS 4
Providing usernames and passwords to Git\&.
.RE
.PP
\fBgitcvs-migration\fR(7)
.RS 4
Git for CVS users\&.
.RE
.PP
\fBgitdiffcore\fR(7)
.RS 4
Tweaking diff output\&.
.RE
.PP
\fBgiteveryday\fR(7)
.RS 4
A useful minimum set of commands for Everyday Git\&.
.RE
.PP
\fBgitfaq\fR(7)
.RS 4
Frequently asked questions about using Git\&.
.RE
.PP
\fBgitglossary\fR(7)
.RS 4
A Git Glossary\&.
.RE
.PP
\fBgitnamespaces\fR(7)
.RS 4
Git namespaces\&.
.RE
.PP
\fBgitremote-helpers\fR(7)
.RS 4
Helper programs to interact with remote repositories\&.
.RE
.PP
\fBgitsubmodules\fR(7)
.RS 4
Mounting one repository inside another\&.
.RE
.PP
\fBgittutorial\fR(7)
.RS 4
A tutorial introduction to Git\&.
.RE
.PP
\fBgittutorial-2\fR(7)
.RS 4
A tutorial introduction to Git: part two\&.
.RE
.PP
\fBgitworkflows\fR(7)
.RS 4
An overview of recommended workflows with Git\&.
.RE
.SH "REPOSITORY, COMMAND AND FILE INTERFACES"
.sp
This documentation discusses repository and command interfaces which users are expected to interact with directly\&. See \fB\-\-user\-formats\fR in \fBgit-help\fR(1) for more details on the criteria\&.
.PP
\fBgitattributes\fR(5)
.RS 4
Defining attributes per path\&.
.RE
.PP
\fBgitcli\fR(7)
.RS 4
Git command\-line interface and conventions\&.
.RE
.PP
\fBgithooks\fR(5)
.RS 4
Hooks used by Git\&.
.RE
.PP
\fBgitignore\fR(5)
.RS 4
Specifies intentionally untracked files to ignore\&.
.RE
.PP
\fBgitmailmap\fR(5)
.RS 4
Map author/committer names and/or E\-Mail addresses\&.
.RE
.PP
\fBgitmodules\fR(5)
.RS 4
Defining submodule properties\&.
.RE
.PP
\fBgitrepository-layout\fR(5)
.RS 4
Git Repository Layout\&.
.RE
.PP
\fBgitrevisions\fR(7)
.RS 4
Specifying revisions and ranges for Git\&.
.RE
.SH "FILE FORMATS, PROTOCOLS AND OTHER DEVELOPER INTERFACES"
.sp
This documentation discusses file formats, over\-the\-wire protocols and other git developer interfaces\&. See \fB\-\-developer\-interfaces\fR in \fBgit-help\fR(1)\&.
.PP
\fBgitformat-bundle\fR(5)
.RS 4
The bundle file format\&.
.RE
.PP
\fBgitformat-chunk\fR(5)
.RS 4
Chunk\-based file formats\&.
.RE
.PP
\fBgitformat-commit-graph\fR(5)
.RS 4
Git commit\-graph format\&.
.RE
.PP
\fBgitformat-index\fR(5)
.RS 4
Git index format\&.
.RE
.PP
\fBgitformat-pack\fR(5)
.RS 4
Git pack format\&.
.RE
.PP
\fBgitformat-signature\fR(5)
.RS 4
Git cryptographic signature formats\&.
.RE
.PP
\fBgitprotocol-capabilities\fR(5)
.RS 4
Protocol v0 and v1 capabilities\&.
.RE
.PP
\fBgitprotocol-common\fR(5)
.RS 4
Things common to various protocols\&.
.RE
.PP
\fBgitprotocol-http\fR(5)
.RS 4
Git HTTP\-based protocols\&.
.RE
.PP
\fBgitprotocol-pack\fR(5)
.RS 4
How packs are transferred over\-the\-wire\&.
.RE
.PP
\fBgitprotocol-v2\fR(5)
.RS 4
Git Wire Protocol, Version 2\&.
.RE
.SH "CONFIGURATION MECHANISM"
.sp
Git uses a simple text format to store customizations that are per repository and are per user\&. Such a configuration file may look like this:
.sp
.if n \{\
.RS 4
.\}
.nf
#
# A \*(Aq#\*(Aq or \*(Aq;\*(Aq character indicates a comment\&.
#

; core variables
[core]
        ; Don\*(Aqt trust file modes
        filemode = false

; user identity
[user]
        name = "Junio C Hamano"
        email = "gitster@pobox\&.com"
.fi
.if n \{\
.RE
.\}
.sp
.sp
Various commands read from the configuration file and adjust their operation accordingly\&. See \fBgit-config\fR(1) for a list and more details about the configuration mechanism\&.
.SH "IDENTIFIER TERMINOLOGY"
.PP
<object>
.RS 4
Indicates the object name for any type of object\&.
.RE
.PP
<blob>
.RS 4
Indicates a blob object name\&.
.RE
.PP
<tree>
.RS 4
Indicates a tree object name\&.
.RE
.PP
<commit>
.RS 4
Indicates a commit object name\&.
.RE
.PP
<tree\-ish>
.RS 4
Indicates a tree, commit or tag object name\&. A command that takes a <tree\-ish> argument ultimately wants to operate on a <tree> object but automatically dereferences <commit> and <tag> objects that point at a <tree>\&.
.RE
.PP
<commit\-ish>
.RS 4
Indicates a commit or tag object name\&. A command that takes a <commit\-ish> argument ultimately wants to operate on a <commit> object but automatically dereferences <tag> objects that point at a <commit>\&.
.RE
.PP
<type>
.RS 4
Indicates that an object type is required\&. Currently one of:
\fBblob\fR,
\fBtree\fR,
\fBcommit\fR, or
\fBtag\fR\&.
.RE
.PP
<file>
.RS 4
Indicates a filename \- almost always relative to the root of the tree structure
\fBGIT_INDEX_FILE\fR
describes\&.
.RE
.SH "SYMBOLIC IDENTIFIERS"
.sp
Any Git command accepting any <object> can also use the following symbolic notation:
.PP
HEAD
.RS 4
indicates the head of the current branch\&.
.RE
.PP
<tag>
.RS 4
a valid tag
\fIname\fR
(i\&.e\&. a
\fBrefs/tags/<tag>\fR
reference)\&.
.RE
.PP
<head>
.RS 4
a valid head
\fIname\fR
(i\&.e\&. a
\fBrefs/heads/<head>\fR
reference)\&.
.RE
.sp
For a more complete list of ways to spell object names, see "SPECIFYING REVISIONS" section in \fBgitrevisions\fR(7)\&.
.SH "FILE/DIRECTORY STRUCTURE"
.sp
Please see the \fBgitrepository-layout\fR(5) document\&.
.sp
Read \fBgithooks\fR(5) for more details about each hook\&.
.sp
Higher level SCMs may provide and manage additional information in the \fB$GIT_DIR\fR\&.
.SH "TERMINOLOGY"
.sp
Please see \fBgitglossary\fR(7)\&.
.SH "ENVIRONMENT VARIABLES"
.sp
Various Git commands pay attention to environment variables and change their behavior\&. The environment variables marked as "Boolean" take their values the same way as Boolean valued configuration variables, e\&.g\&. "true", "yes", "on" and positive numbers are taken as "yes"\&.
.sp
Here are the variables:
.SS "The Git Repository"
.sp
These environment variables apply to \fIall\fR core Git commands\&. Nb: it is worth noting that they may be used/overridden by SCMS sitting above Git so take care if using a foreign front\-end\&.
.PP
\fBGIT_INDEX_FILE\fR
.RS 4
This environment variable specifies an alternate index file\&. If not specified, the default of
\fB$GIT_DIR/index\fR
is used\&.
.RE
.PP
\fBGIT_INDEX_VERSION\fR
.RS 4
This environment variable specifies what index version is used when writing the index file out\&. It won\(cqt affect existing index files\&. By default index file version 2 or 3 is used\&. See
\fBgit-update-index\fR(1)
for more information\&.
.RE
.PP
\fBGIT_OBJECT_DIRECTORY\fR
.RS 4
If the object storage directory is specified via this environment variable then the sha1 directories are created underneath \- otherwise the default
\fB$GIT_DIR/objects\fR
directory is used\&.
.RE
.PP
\fBGIT_ALTERNATE_OBJECT_DIRECTORIES\fR
.RS 4
Due to the immutable nature of Git objects, old objects can be archived into shared, read\-only directories\&. This variable specifies a ":" separated (on Windows ";" separated) list of Git object directories which can be used to search for Git objects\&. New objects will not be written to these directories\&.
.sp
Entries that begin with
\fB"\fR
(double\-quote) will be interpreted as C\-style quoted paths, removing leading and trailing double\-quotes and respecting backslash escapes\&. E\&.g\&., the value
\fB"path\-with\-\e"\-and\-:\-in\-it":vanilla\-path\fR
has two paths:
\fBpath\-with\-"\-and\-:\-in\-it\fR
and
\fBvanilla\-path\fR\&.
.RE
.PP
\fBGIT_DIR\fR
.RS 4
If the
\fBGIT_DIR\fR
environment variable is set then it specifies a path to use instead of the default
\fB\&.git\fR
for the base of the repository\&. The
\fB\-\-git\-dir\fR
command\-line option also sets this value\&.
.RE
.PP
\fBGIT_WORK_TREE\fR
.RS 4
Set the path to the root of the working tree\&. This can also be controlled by the
\fB\-\-work\-tree\fR
command\-line option and the core\&.worktree configuration variable\&.
.RE
.PP
\fBGIT_NAMESPACE\fR
.RS 4
Set the Git namespace; see
\fBgitnamespaces\fR(7)
for details\&. The
\fB\-\-namespace\fR
command\-line option also sets this value\&.
.RE
.PP
\fBGIT_CEILING_DIRECTORIES\fR
.RS 4
This should be a colon\-separated list of absolute paths\&. If set, it is a list of directories that Git should not chdir up into while looking for a repository directory (useful for excluding slow\-loading network directories)\&. It will not exclude the current working directory or a GIT_DIR set on the command line or in the environment\&. Normally, Git has to read the entries in this list and resolve any symlink that might be present in order to compare them with the current directory\&. However, if even this access is slow, you can add an empty entry to the list to tell Git that the subsequent entries are not symlinks and needn\(cqt be resolved; e\&.g\&.,
\fBGIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink\fR\&.
.RE
.PP
\fBGIT_DISCOVERY_ACROSS_FILESYSTEM\fR
.RS 4
When run in a directory that does not have "\&.git" repository directory, Git tries to find such a directory in the parent directories to find the top of the working tree, but by default it does not cross filesystem boundaries\&. This Boolean environment variable can be set to true to tell Git not to stop at filesystem boundaries\&. Like
\fBGIT_CEILING_DIRECTORIES\fR, this will not affect an explicit repository directory set via
\fBGIT_DIR\fR
or on the command line\&.
.RE
.PP
\fBGIT_COMMON_DIR\fR
.RS 4
If this variable is set to a path, non\-worktree files that are normally in $GIT_DIR will be taken from this path instead\&. Worktree\-specific files such as HEAD or index are taken from $GIT_DIR\&. See
\fBgitrepository-layout\fR(5)
and
\fBgit-worktree\fR(1)
for details\&. This variable has lower precedence than other path variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY\&...
.RE
.PP
\fBGIT_DEFAULT_HASH\fR
.RS 4
If this variable is set, the default hash algorithm for new repositories will be set to this value\&. This value is ignored when cloning and the setting of the remote repository is always used\&. The default is "sha1"\&. See
\fB\-\-object\-format\fR
in
\fBgit-init\fR(1)\&.
.RE
.PP
\fBGIT_DEFAULT_REF_FORMAT\fR
.RS 4
If this variable is set, the default reference backend format for new repositories will be set to this value\&. The default is "files"\&. See
\fB\-\-ref\-format\fR
in
\fBgit-init\fR(1)\&.
.RE
.SS "Git Commits"
.PP
\fBGIT_AUTHOR_NAME\fR
.RS 4
The human\-readable name used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
\fBuser\&.name\fR
and
\fBauthor\&.name\fR
configuration settings\&.
.RE
.PP
\fBGIT_AUTHOR_EMAIL\fR
.RS 4
The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
\fBuser\&.email\fR
and
\fBauthor\&.email\fR
configuration settings\&.
.RE
.PP
\fBGIT_AUTHOR_DATE\fR
.RS 4
The date used for the author identity when creating commit or tag objects, or when writing reflogs\&. See
\fBgit-commit\fR(1)
for valid formats\&.
.RE
.PP
\fBGIT_COMMITTER_NAME\fR
.RS 4
The human\-readable name used in the committer identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
\fBuser\&.name\fR
and
\fBcommitter\&.name\fR
configuration settings\&.
.RE
.PP
\fBGIT_COMMITTER_EMAIL\fR
.RS 4
The email address used in the author identity when creating commit or tag objects, or when writing reflogs\&. Overrides the
\fBuser\&.email\fR
and
\fBcommitter\&.email\fR
configuration settings\&.
.RE
.PP
\fBGIT_COMMITTER_DATE\fR
.RS 4
The date used for the committer identity when creating commit or tag objects, or when writing reflogs\&. See
\fBgit-commit\fR(1)
for valid formats\&.
.RE
.PP
\fBEMAIL\fR
.RS 4
The email address used in the author and committer identities if no other relevant environment variable or configuration setting has been set\&.
.RE
.SS "Git Diffs"
.PP
\fBGIT_DIFF_OPTS\fR
.RS 4
Only valid setting is "\-\-unified=??" or "\-u??" to set the number of context lines shown when a unified diff is created\&. This takes precedence over any "\-U" or "\-\-unified" option value passed on the Git diff command line\&.
.RE
.PP
\fBGIT_EXTERNAL_DIFF\fR
.RS 4
When the environment variable
\fBGIT_EXTERNAL_DIFF\fR
is set, the program named by it is called to generate diffs, and Git does not use its builtin diff machinery\&. For a path that is added, removed, or modified,
\fBGIT_EXTERNAL_DIFF\fR
is called with 7 parameters:
.sp
.if n \{\
.RS 4
.\}
.nf
path old\-file old\-hex old\-mode new\-file new\-hex new\-mode
.fi
.if n \{\
.RE
.\}
.sp
where:
.RE
.PP
<old|new>\-file
.RS 4
are files GIT_EXTERNAL_DIFF can use to read the contents of <old|new>,
.RE
.PP
<old|new>\-hex
.RS 4
are the 40\-hexdigit SHA\-1 hashes,
.RE
.PP
<old|new>\-mode
.RS 4
are the octal representation of the file modes\&.
.sp
The file parameters can point at the user\(cqs working file (e\&.g\&.
\fBnew\-file\fR
in "git\-diff\-files"),
\fB/dev/null\fR
(e\&.g\&.
\fBold\-file\fR
when a new file is added), or a temporary file (e\&.g\&.
\fBold\-file\fR
in the index)\&.
\fBGIT_EXTERNAL_DIFF\fR
should not worry about unlinking the temporary file \(em it is removed when
\fBGIT_EXTERNAL_DIFF\fR
exits\&.
.sp
For a path that is unmerged,
\fBGIT_EXTERNAL_DIFF\fR
is called with 1 parameter, <path>\&.
.sp
For each path
\fBGIT_EXTERNAL_DIFF\fR
is called, two environment variables,
\fBGIT_DIFF_PATH_COUNTER\fR
and
\fBGIT_DIFF_PATH_TOTAL\fR
are set\&.
.RE
.PP
\fBGIT_DIFF_PATH_COUNTER\fR
.RS 4
A 1\-based counter incremented by one for every path\&.
.RE
.PP
\fBGIT_DIFF_PATH_TOTAL\fR
.RS 4
The total number of paths\&.
.RE
.SS "other"
.PP
\fBGIT_MERGE_VERBOSITY\fR
.RS 4
A number controlling the amount of output shown by the recursive merge strategy\&. Overrides merge\&.verbosity\&. See
\fBgit-merge\fR(1)
.RE
.PP
\fBGIT_PAGER\fR
.RS 4
This environment variable overrides
\fB$PAGER\fR\&. If it is set to an empty string or to the value "cat", Git will not launch a pager\&. See also the
\fBcore\&.pager\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_PROGRESS_DELAY\fR
.RS 4
A number controlling how many seconds to delay before showing optional progress indicators\&. Defaults to 2\&.
.RE
.PP
\fBGIT_EDITOR\fR
.RS 4
This environment variable overrides
\fB$EDITOR\fR
and
\fB$VISUAL\fR\&. It is used by several Git commands when, on interactive mode, an editor is to be launched\&. See also
\fBgit-var\fR(1)
and the
\fBcore\&.editor\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_SEQUENCE_EDITOR\fR
.RS 4
This environment variable overrides the configured Git editor when editing the todo list of an interactive rebase\&. See also
\fBgit-rebase\fR(1)
and the
\fBsequence\&.editor\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_SSH\fR, \fBGIT_SSH_COMMAND\fR
.RS 4
If either of these environment variables is set then
\fIgit fetch\fR
and
\fIgit push\fR
will use the specified command instead of
\fIssh\fR
when they need to connect to a remote system\&. The command\-line parameters passed to the configured command are determined by the ssh variant\&. See
\fBssh\&.variant\fR
option in
\fBgit-config\fR(1)
for details\&.
.sp
\fB$GIT_SSH_COMMAND\fR
takes precedence over
\fB$GIT_SSH\fR, and is interpreted by the shell, which allows additional arguments to be included\&.
\fB$GIT_SSH\fR
on the other hand must be just the path to a program (which can be a wrapper shell script, if additional arguments are needed)\&.
.sp
Usually it is easier to configure any desired options through your personal
\fB\&.ssh/config\fR
file\&. Please consult your ssh documentation for further details\&.
.RE
.PP
\fBGIT_SSH_VARIANT\fR
.RS 4
If this environment variable is set, it overrides Git\(cqs autodetection whether
\fBGIT_SSH\fR/\fBGIT_SSH_COMMAND\fR/\fBcore\&.sshCommand\fR
refer to OpenSSH, plink or tortoiseplink\&. This variable overrides the config setting
\fBssh\&.variant\fR
that serves the same purpose\&.
.RE
.PP
\fBGIT_SSL_NO_VERIFY\fR
.RS 4
Setting and exporting this environment variable to any value tells Git not to verify the SSL certificate when fetching or pushing over HTTPS\&.
.RE
.PP
\fBGIT_ATTR_SOURCE\fR
.RS 4
Sets the treeish that gitattributes will be read from\&.
.RE
.PP
\fBGIT_ASKPASS\fR
.RS 4
If this environment variable is set, then Git commands which need to acquire passwords or passphrases (e\&.g\&. for HTTP or IMAP authentication) will call this program with a suitable prompt as command\-line argument and read the password from its STDOUT\&. See also the
\fBcore\&.askPass\fR
option in
\fBgit-config\fR(1)\&.
.RE
.PP
\fBGIT_TERMINAL_PROMPT\fR
.RS 4
If this Boolean environment variable is set to false, git will not prompt on the terminal (e\&.g\&., when asking for HTTP authentication)\&.
.RE
.PP
\fBGIT_CONFIG_GLOBAL\fR, \fBGIT_CONFIG_SYSTEM\fR
.RS 4
Take the configuration from the given files instead from global or system\-level configuration files\&. If
\fBGIT_CONFIG_SYSTEM\fR
is set, the system config file defined at build time (usually
\fB/etc/gitconfig\fR) will not be read\&. Likewise, if
\fBGIT_CONFIG_GLOBAL\fR
is set, neither
\fB$HOME/\&.gitconfig\fR
nor
\fB$XDG_CONFIG_HOME/git/config\fR
will be read\&. Can be set to
\fB/dev/null\fR
to skip reading configuration files of the respective level\&.
.RE
.PP
\fBGIT_CONFIG_NOSYSTEM\fR
.RS 4
Whether to skip reading settings from the system\-wide
\fB$(prefix)/etc/gitconfig\fR
file\&. This Boolean environment variable can be used along with
\fB$HOME\fR
and
\fB$XDG_CONFIG_HOME\fR
to create a predictable environment for a picky script, or you can set it to true to temporarily avoid using a buggy
\fB/etc/gitconfig\fR
file while waiting for someone with sufficient permissions to fix it\&.
.RE
.PP
\fBGIT_FLUSH\fR
.RS 4
If this Boolean environment variable is set to true, then commands such as
\fIgit blame\fR
(in incremental mode),
\fIgit rev\-list\fR,
\fIgit log\fR,
\fIgit check\-attr\fR
and
\fIgit check\-ignore\fR
will force a flush of the output stream after each record have been flushed\&. If this variable is set to false, the output of these commands will be done using completely buffered I/O\&. If this environment variable is not set, Git will choose buffered or record\-oriented flushing based on whether stdout appears to be redirected to a file or not\&.
.RE
.PP
\fBGIT_TRACE\fR
.RS 4
Enables general trace messages, e\&.g\&. alias expansion, built\-in command execution and external command execution\&.
.sp
If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
.sp
If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor\&.
.sp
Alternatively, if the variable is set to an absolute path (starting with a
\fI/\fR
character), Git will interpret this as a file path and will try to append the trace messages to it\&.
.sp
Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
.RE
.PP
\fBGIT_TRACE_FSMONITOR\fR
.RS 4
Enables trace messages for the filesystem monitor extension\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_PACK_ACCESS\fR
.RS 4
Enables trace messages for all accesses to any packs\&. For each access, the pack file name and an offset in the pack is recorded\&. This may be helpful for troubleshooting some pack\-related performance problems\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_PACKET\fR
.RS 4
Enables trace messages for all packets coming in or out of a given program\&. This can help with debugging object negotiation or other protocol issues\&. Tracing is turned off at a packet starting with "PACK" (but see
\fBGIT_TRACE_PACKFILE\fR
below)\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_PACKFILE\fR
.RS 4
Enables tracing of packfiles sent or received by a given program\&. Unlike other trace output, this trace is verbatim: no headers, and no quoting of binary data\&. You almost certainly want to direct into a file (e\&.g\&.,
\fBGIT_TRACE_PACKFILE=/tmp/my\&.pack\fR) rather than displaying it on the terminal or mixing it with other trace output\&.
.sp
Note that this is currently only implemented for the client side of clones and fetches\&.
.RE
.PP
\fBGIT_TRACE_PERFORMANCE\fR
.RS 4
Enables performance related trace messages, e\&.g\&. total execution time of each Git command\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_REFS\fR
.RS 4
Enables trace messages for operations on the ref database\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_SETUP\fR
.RS 4
Enables trace messages printing the \&.git, working tree and current working directory after Git has completed its setup phase\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_SHALLOW\fR
.RS 4
Enables trace messages that can help debugging fetching / cloning of shallow repositories\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_CURL\fR
.RS 4
Enables a curl full trace dump of all incoming and outgoing data, including descriptive information, of the git transport protocol\&. This is similar to doing curl
\fB\-\-trace\-ascii\fR
on the command line\&. See
\fBGIT_TRACE\fR
for available trace output options\&.
.RE
.PP
\fBGIT_TRACE_CURL_NO_DATA\fR
.RS 4
When a curl trace is enabled (see
\fBGIT_TRACE_CURL\fR
above), do not dump data (that is, only dump info lines and headers)\&.
.RE
.PP
\fBGIT_TRACE2\fR
.RS 4
Enables more detailed trace messages from the "trace2" library\&. Output from
\fBGIT_TRACE2\fR
is a simple text\-based format for human readability\&.
.sp
If this variable is set to "1", "2" or "true" (comparison is case insensitive), trace messages will be printed to stderr\&.
.sp
If the variable is set to an integer value greater than 2 and lower than 10 (strictly) then Git will interpret this value as an open file descriptor and will try to write the trace messages into this file descriptor\&.
.sp
Alternatively, if the variable is set to an absolute path (starting with a
\fI/\fR
character), Git will interpret this as a file path and will try to append the trace messages to it\&. If the path already exists and is a directory, the trace messages will be written to files (one per process) in that directory, named according to the last component of the SID and an optional counter (to avoid filename collisions)\&.
.sp
In addition, if the variable is set to
\fBaf_unix:[<socket\-type>:]<absolute\-pathname>\fR, Git will try to open the path as a Unix Domain Socket\&. The socket type can be either
\fBstream\fR
or
\fBdgram\fR\&.
.sp
Unsetting the variable, or setting it to empty, "0" or "false" (case insensitive) disables trace messages\&.
.sp
See
\m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
for full details\&.
.RE
.PP
\fBGIT_TRACE2_EVENT\fR
.RS 4
This setting writes a JSON\-based format that is suited for machine interpretation\&. See
\fBGIT_TRACE2\fR
for available trace output options and
\m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
for full details\&.
.RE
.PP
\fBGIT_TRACE2_PERF\fR
.RS 4
In addition to the text\-based messages available in
\fBGIT_TRACE2\fR, this setting writes a column\-based format for understanding nesting regions\&. See
\fBGIT_TRACE2\fR
for available trace output options and
\m[blue]\fBTrace2 documentation\fR\m[]\&\s-2\u[2]\d\s+2
for full details\&.
.RE
.PP
\fBGIT_TRACE_REDACT\fR
.RS 4
By default, when tracing is activated, Git redacts the values of cookies, the "Authorization:" header, the "Proxy\-Authorization:" header and packfile URIs\&. Set this Boolean environment variable to false to prevent this redaction\&.
.RE
.PP
\fBGIT_NO_REPLACE_OBJECTS\fR
.RS 4
Setting and exporting this environment variable tells Git to ignore replacement refs and do not replace Git objects\&.
.RE
.PP
\fBGIT_LITERAL_PATHSPECS\fR
.RS 4
Setting this Boolean environment variable to true will cause Git to treat all pathspecs literally, rather than as glob patterns\&. For example, running
\fBGIT_LITERAL_PATHSPECS=1 git log \-\- \*(Aq*\&.c\*(Aq\fR
will search for commits that touch the path
\fB*\&.c\fR, not any paths that the glob
\fB*\&.c\fR
matches\&. You might want this if you are feeding literal paths to Git (e\&.g\&., paths previously given to you by
\fBgit ls\-tree\fR,
\fB\-\-raw\fR
diff output, etc)\&.
.RE
.PP
\fBGIT_GLOB_PATHSPECS\fR
.RS 4
Setting this Boolean environment variable to true will cause Git to treat all pathspecs as glob patterns (aka "glob" magic)\&.
.RE
.PP
\fBGIT_NOGLOB_PATHSPECS\fR
.RS 4
Setting this Boolean environment variable to true will cause Git to treat all pathspecs as literal (aka "literal" magic)\&.
.RE
.PP
\fBGIT_ICASE_PATHSPECS\fR
.RS 4
Setting this Boolean environment variable to true will cause Git to treat all pathspecs as case\-insensitive\&.
.RE
.PP
\fBGIT_NO_LAZY_FETCH\fR
.RS 4
Setting this Boolean environment variable to true tells Git not to lazily fetch missing objects from the promisor remote on demand\&.
.RE
.PP
\fBGIT_REFLOG_ACTION\fR
.RS 4
When a ref is updated, reflog entries are created to keep track of the reason why the ref was updated (which is typically the name of the high\-level command that updated the ref), in addition to the old and new values of the ref\&. A scripted Porcelain command can use set_reflog_action helper function in
\fBgit\-sh\-setup\fR
to set its name to this variable when it is invoked as the top level command by the end user, to be recorded in the body of the reflog\&.
.RE
.PP
\fBGIT_REF_PARANOIA\fR
.RS 4
If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating over lists of refs\&. Normally Git will try to include any such refs, which may cause some operations to fail\&. This is usually preferable, as potentially destructive operations (e\&.g\&.,
\fBgit-prune\fR(1)) are better off aborting rather than ignoring broken refs (and thus considering the history they point to as not worth saving)\&. The default value is
\fB1\fR
(i\&.e\&., be paranoid about detecting and aborting all operations)\&. You should not normally need to set this to
\fB0\fR, but it may be useful when trying to salvage data from a corrupted repository\&.
.RE
.PP
\fBGIT_COMMIT_GRAPH_PARANOIA\fR
.RS 4
When loading a commit object from the commit\-graph, Git performs an existence check on the object in the object database\&. This is done to avoid issues with stale commit\-graphs that contain references to already\-deleted commits, but comes with a performance penalty\&.
.sp
The default is "false", which disables the aforementioned behavior\&. Setting this to "true" enables the existence check so that stale commits will never be returned from the commit\-graph at the cost of performance\&.
.RE
.PP
\fBGIT_ALLOW_PROTOCOL\fR
.RS 4
If set to a colon\-separated list of protocols, behave as if
\fBprotocol\&.allow\fR
is set to
\fBnever\fR, and each of the listed protocols has
\fBprotocol\&.<name>\&.allow\fR
set to
\fBalways\fR
(overriding any existing configuration)\&. See the description of
\fBprotocol\&.allow\fR
in
\fBgit-config\fR(1)
for more details\&.
.RE
.PP
\fBGIT_PROTOCOL_FROM_USER\fR
.RS 4
Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are configured to the
\fBuser\fR
state\&. This is useful to restrict recursive submodule initialization from an untrusted repository or for programs which feed potentially\-untrusted URLS to git commands\&. See
\fBgit-config\fR(1)
for more details\&.
.RE
.PP
\fBGIT_PROTOCOL\fR
.RS 4
For internal use only\&. Used in handshaking the wire protocol\&. Contains a colon
\fI:\fR
separated list of keys with optional values
\fI<key>[=<value>]\fR\&. Presence of unknown keys and values must be ignored\&.
.sp
Note that servers may need to be configured to allow this variable to pass over some transports\&. It will be propagated automatically when accessing local repositories (i\&.e\&.,
\fBfile://\fR
or a filesystem path), as well as over the
\fBgit://\fR
protocol\&. For git\-over\-http, it should work automatically in most configurations, but see the discussion in
\fBgit-http-backend\fR(1)\&. For git\-over\-ssh, the ssh server may need to be configured to allow clients to pass this variable (e\&.g\&., by using
\fBAcceptEnv GIT_PROTOCOL\fR
with OpenSSH)\&.
.sp
This configuration is optional\&. If the variable is not propagated, then clients will fall back to the original "v0" protocol (but may miss out on some performance improvements or features)\&. This variable currently only affects clones and fetches; it is not yet used for pushes (but may be in the future)\&.
.RE
.PP
\fBGIT_OPTIONAL_LOCKS\fR
.RS 4
If this Boolean environment variable is set to false, Git will complete any requested operation without performing any optional sub\-operations that require taking a lock\&. For example, this will prevent
\fBgit status\fR
from refreshing the index as a side effect\&. This is useful for processes running in the background which do not want to cause lock contention with other operations on the repository\&. Defaults to
\fB1\fR\&.
.RE
.PP
\fBGIT_REDIRECT_STDIN\fR, \fBGIT_REDIRECT_STDOUT\fR, \fBGIT_REDIRECT_STDERR\fR
.RS 4
Windows\-only: allow redirecting the standard input/output/error handles to paths specified by the environment variables\&. This is particularly useful in multi\-threaded applications where the canonical way to pass standard handles via
\fBCreateProcess()\fR
is not an option because it would require the handles to be marked inheritable (and consequently
\fBevery\fR
spawned process would inherit them, possibly blocking regular Git operations)\&. The primary intended use case is to use named pipes for communication (e\&.g\&.
\fB\e\e\&.\epipe\emy\-git\-stdin\-123\fR)\&.
.sp
Two special values are supported:
\fBoff\fR
will simply close the corresponding standard handle, and if
\fBGIT_REDIRECT_STDERR\fR
is
\fB2>&1\fR, standard error will be redirected to the same handle as standard output\&.
.RE
.PP
\fBGIT_PRINT_SHA1_ELLIPSIS\fR (deprecated)
.RS 4
If set to
\fByes\fR, print an ellipsis following an (abbreviated) SHA\-1 value\&. This affects indications of detached HEADs (\fBgit-checkout\fR(1)) and the raw diff output (\fBgit-diff\fR(1))\&. Printing an ellipsis in the cases mentioned is no longer considered adequate and support for it is likely to be removed in the foreseeable future (along with the variable)\&.
.RE
.SH "DISCUSSION"
.sp
More detail on the following is available from the \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[3]\d\s+2 and \fBgitcore-tutorial\fR(7)\&.
.sp
A Git project normally consists of a working directory with a "\&.git" subdirectory at the top level\&. The \&.git directory contains, among other things, a compressed object database representing the complete history of the project, an "index" file which links that history to the current contents of the working tree, and named pointers into that history such as tags and branch heads\&.
.sp
The object database contains objects of three main types: blobs, which hold file data; trees, which point to blobs and other trees to build up directory hierarchies; and commits, which each reference a single tree and some number of parent commits\&.
.sp
The commit, equivalent to what other systems call a "changeset" or "version", represents a step in the project\(cqs history, and each parent represents an immediately preceding step\&. Commits with more than one parent represent merges of independent lines of development\&.
.sp
All objects are named by the SHA\-1 hash of their contents, normally written as a string of 40 hex digits\&. Such names are globally unique\&. The entire history leading up to a commit can be vouched for by signing just that commit\&. A fourth object type, the tag, is provided for this purpose\&.
.sp
When first created, objects are stored in individual files, but for efficiency may later be compressed together into "pack files"\&.
.sp
Named pointers called refs mark interesting points in history\&. A ref may contain the SHA\-1 name of an object or the name of another ref (the latter is called a "symbolic ref")\&. Refs with names beginning \fBrefs/head/\fR contain the SHA\-1 name of the most recent commit (or "head") of a branch under development\&. SHA\-1 names of tags of interest are stored under \fBrefs/tags/\fR\&. A symbolic ref named \fBHEAD\fR contains the name of the currently checked\-out branch\&.
.sp
The index file is initialized with a list of all paths and, for each path, a blob object and a set of attributes\&. The blob object represents the contents of the file as of the head of the current branch\&. The attributes (last modified time, size, etc\&.) are taken from the corresponding file in the working tree\&. Subsequent changes to the working tree can be found by comparing these attributes\&. The index may be updated with new content, and new commits may be created from the content stored in the index\&.
.sp
The index is also capable of storing multiple entries (called "stages") for a given pathname\&. These stages are used to hold the various unmerged version of a file when a merge is in progress\&.
.SH "FURTHER DOCUMENTATION"
.sp
See the references in the "description" section to get started using Git\&. The following is probably more detail than necessary for a first\-time user\&.
.sp
The \m[blue]\fBGit concepts chapter of the user\-manual\fR\m[]\&\s-2\u[3]\d\s+2 and \fBgitcore-tutorial\fR(7) both provide introductions to the underlying Git architecture\&.
.sp
See \fBgitworkflows\fR(7) for an overview of recommended workflows\&.
.sp
See also the \m[blue]\fBhowto\fR\m[]\&\s-2\u[4]\d\s+2 documents for some useful examples\&.
.sp
The internals are documented in the \m[blue]\fBGit API documentation\fR\m[]\&\s-2\u[5]\d\s+2\&.
.sp
Users migrating from CVS may also want to read \fBgitcvs-migration\fR(7)\&.
.SH "AUTHORS"
.sp
Git was started by Linus Torvalds, and is currently maintained by Junio C Hamano\&. Numerous contributions have come from the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[6]\d\s+2>\&. \m[blue]\fBhttps://openhub\&.net/p/git/contributors/summary\fR\m[] gives you a more complete list of contributors\&.
.sp
If you have a clone of git\&.git itself, the output of \fBgit-shortlog\fR(1) and \fBgit-blame\fR(1) can show you the authors for specific parts of the project\&.
.SH "REPORTING BUGS"
.sp
Report bugs to the Git mailing list <\m[blue]\fBgit@vger\&.kernel\&.org\fR\m[]\&\s-2\u[6]\d\s+2> where the development and maintenance is primarily done\&. You do not have to be subscribed to the list to send a message there\&. See the list archive at \m[blue]\fBhttps://lore\&.kernel\&.org/git\fR\m[] for previous bug reports and other discussions\&.
.sp
Issues which are security relevant should be disclosed privately to the Git Security mailing list <\m[blue]\fBgit\-security@googlegroups\&.com\fR\m[]\&\s-2\u[7]\d\s+2>\&.
.SH "SEE ALSO"
.sp
\fBgittutorial\fR(7), \fBgittutorial-2\fR(7), \fBgiteveryday\fR(7), \fBgitcvs-migration\fR(7), \fBgitglossary\fR(7), \fBgitcore-tutorial\fR(7), \fBgitcli\fR(7), \m[blue]\fBThe Git User\(cqs Manual\fR\m[]\&\s-2\u[1]\d\s+2, \fBgitworkflows\fR(7)
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite
.SH "NOTES"
.IP " 1." 4
Git User\(cqs Manual
.RS 4
\%git-htmldocs/user-manual.html
.RE
.IP " 2." 4
Trace2 documentation
.RS 4
\%git-htmldocs/technical/api-trace2.html
.RE
.IP " 3." 4
Git concepts chapter of the user-manual
.RS 4
\%git-htmldocs/user-manual.html#git-concepts
.RE
.IP " 4." 4
howto
.RS 4
\%git-htmldocs/howto-index.html
.RE
.IP " 5." 4
Git API documentation
.RS 4
\%git-htmldocs/technical/api-index.html
.RE
.IP " 6." 4
git@vger.kernel.org
.RS 4
\%mailto:git@vger.kernel.org
.RE
.IP " 7." 4
git-security@googlegroups.com
.RS 4
\%mailto:git-security@googlegroups.com
.RE