blob: 05857c96ff2598dc39a426300b52697049f25997 [file] [log] [blame]
Junio C Hamanof7c042d2008-06-06 22:50:531git(1)
Junio C Hamano1a4e8412005-12-27 08:17:232======
3
4NAME
5----
6git - the stupid content tracker
7
8
9SYNOPSIS
10--------
Junio C Hamano6b2cee12006-08-26 08:43:3111[verse]
Junio C Hamano79f4c7c2013-09-20 21:03:3712'git' [--version] [--help] [-C <path>] [-c <name>=<value>]
Junio C Hamano90ff60f2012-02-20 10:25:1413 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
Junio C Hamanof7279012011-08-18 06:13:1314 [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
15 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
Junio C Hamano90ff60f2012-02-20 10:25:1416 <command> [<args>]
Junio C Hamano1a4e8412005-12-27 08:17:2317
18DESCRIPTION
19-----------
Junio C Hamanoe27fb932006-04-03 05:34:1020Git is a fast, scalable, distributed revision control system with an
21unusually rich command set that provides both high-level operations
22and full access to internals.
23
Junio C Hamanofce7c7e2008-07-02 03:06:3824See linkgit:gittutorial[7] to get started, then see
Junio C Hamanod0316112012-08-22 19:55:2925link:everyday.html[Everyday Git] for a useful minimum set of
26commands. The link:user-manual.html[Git User's Manual] has a more
27in-depth introduction.
Junio C Hamano1a4e8412005-12-27 08:17:2328
Junio C Hamanod0316112012-08-22 19:55:2929After you mastered the basic concepts, you can come back to this
Junio C Hamano076ffcc2013-02-06 05:13:2130page to learn what commands Git offers. You can learn more about
31individual Git commands with "git help command". linkgit:gitcli[7]
Junio C Hamanoe1aeb5e2014-06-06 19:16:2932manual page gives you an overview of the command-line command syntax.
Junio C Hamano33db4372006-06-07 19:51:4533
Junio C Hamano076ffcc2013-02-06 05:13:2134Formatted and hyperlinked version of the latest Git documentation
Junio C Hamanod0316112012-08-22 19:55:2935can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
Junio C Hamanob63afff2007-05-01 03:05:5536
Junio C Hamano9d52e572007-02-13 23:48:2037ifdef::stalenotes[]
38[NOTE]
39============
Junio C Hamano9d52e572007-02-13 23:48:2040
Junio C Hamanoa9b8d242007-05-19 04:51:5541You are reading the documentation for the latest (possibly
Junio C Hamanoe1aeb5e2014-06-06 19:16:2942unreleased) version of Git, that is available from the 'master'
Junio C Hamanoa9b8d242007-05-19 04:51:5543branch of the `git.git` repository.
44Documentation for older releases are available here:
Junio C Hamano2fc92602007-03-29 01:09:4645
Junio C Hamano6f0c9442014-07-16 21:51:3246* link:v2.0.2/git.html[documentation for release 2.0.2]
Junio C Hamanofe32aac2014-02-14 22:03:1647
48* release notes for
Junio C Hamano6f0c9442014-07-16 21:51:3249 link:RelNotes/2.0.2.txt[2.0.2],
Junio C Hamano38d02532014-06-26 21:48:5050 link:RelNotes/2.0.1.txt[2.0.1],
Junio C Hamano26aa6502014-05-30 21:38:1351 link:RelNotes/2.0.0.txt[2.0.0].
52
53* link:v1.9.4/git.html[documentation for release 1.9.4]
54
55* release notes for
56 link:RelNotes/1.9.4.txt[1.9.4],
Junio C Hamanoa1131212014-05-09 19:00:3557 link:RelNotes/1.9.3.txt[1.9.3],
Junio C Hamano58242b72014-04-09 20:58:4858 link:RelNotes/1.9.2.txt[1.9.2],
Junio C Hamano3b0cdc22014-03-18 22:06:1659 link:RelNotes/1.9.1.txt[1.9.1],
Junio C Hamanofe32aac2014-02-14 22:03:1660 link:RelNotes/1.9.0.txt[1.9.0].
61
Junio C Hamanoe87f3972014-02-13 22:31:2962* link:v1.8.5.5/git.html[documentation for release 1.8.5.5]
Junio C Hamano5f17d9d2013-11-27 22:14:5963
64* release notes for
Junio C Hamanoe87f3972014-02-13 22:31:2965 link:RelNotes/1.8.5.5.txt[1.8.5.5],
Junio C Hamanoa9c36342014-02-06 23:33:4266 link:RelNotes/1.8.5.4.txt[1.8.5.4],
Junio C Hamanobc8d4782014-01-13 23:35:5067 link:RelNotes/1.8.5.3.txt[1.8.5.3],
Junio C Hamanocf77b042013-12-17 23:54:2168 link:RelNotes/1.8.5.2.txt[1.8.5.2],
Junio C Hamanob73af6c2013-12-03 22:07:1169 link:RelNotes/1.8.5.1.txt[1.8.5.1],
Junio C Hamano5f17d9d2013-11-27 22:14:5970 link:RelNotes/1.8.5.txt[1.8.5].
71
Junio C Hamano6c7be462013-12-03 07:18:4472* link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
Junio C Hamano683a8612013-08-23 20:50:0973
74* release notes for
Junio C Hamano6c7be462013-12-03 07:18:4475 link:RelNotes/1.8.4.5.txt[1.8.4.5],
Junio C Hamanobc70a472013-11-20 21:49:5676 link:RelNotes/1.8.4.4.txt[1.8.4.4],
Junio C Hamanoca1814f2013-11-08 21:29:5077 link:RelNotes/1.8.4.3.txt[1.8.4.3],
Junio C Hamano79a784d2013-10-28 19:15:4378 link:RelNotes/1.8.4.2.txt[1.8.4.2],
Junio C Hamano369e3402013-10-15 18:40:2579 link:RelNotes/1.8.4.1.txt[1.8.4.1],
Junio C Hamano683a8612013-08-23 20:50:0980 link:RelNotes/1.8.4.txt[1.8.4].
81
Junio C Hamano58f587a2013-07-22 19:20:5982* link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
Junio C Hamanoc7102962013-05-29 23:57:1783
84* release notes for
Junio C Hamano58f587a2013-07-22 19:20:5985 link:RelNotes/1.8.3.4.txt[1.8.3.4],
Junio C Hamanoededf2b2013-07-15 21:11:1686 link:RelNotes/1.8.3.3.txt[1.8.3.3],
Junio C Hamano1b5a3822013-06-28 22:15:4787 link:RelNotes/1.8.3.2.txt[1.8.3.2],
Junio C Hamano8d74cd32013-06-10 19:54:5588 link:RelNotes/1.8.3.1.txt[1.8.3.1],
Junio C Hamanoc7102962013-05-29 23:57:1789 link:RelNotes/1.8.3.txt[1.8.3].
90
Junio C Hamanofb593352013-05-09 21:34:4591* link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
Junio C Hamano353e1c92013-03-13 19:11:4492
93* release notes for
Junio C Hamanoc7102962013-05-29 23:57:1794 link:RelNotes/1.8.2.3.txt[1.8.2.3],
95 link:RelNotes/1.8.2.2.txt[1.8.2.2],
96 link:RelNotes/1.8.2.1.txt[1.8.2.1],
Junio C Hamano353e1c92013-03-13 19:11:4497 link:RelNotes/1.8.2.txt[1.8.2].
98
Junio C Hamano63b6fdb2013-04-07 23:37:1399* link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
Junio C Hamano9b2005a2013-01-01 00:10:52100
101* release notes for
Junio C Hamano63b6fdb2013-04-07 23:37:13102 link:RelNotes/1.8.1.6.txt[1.8.1.6],
Junio C Hamano68061622013-03-01 22:13:37103 link:RelNotes/1.8.1.5.txt[1.8.1.5],
Junio C Hamano13044222013-02-20 07:36:18104 link:RelNotes/1.8.1.4.txt[1.8.1.4],
Junio C Hamanob5e079f2013-02-08 00:02:52105 link:RelNotes/1.8.1.3.txt[1.8.1.3],
106 link:RelNotes/1.8.1.2.txt[1.8.1.2],
Junio C Hamano1bac29c2013-01-14 19:48:16107 link:RelNotes/1.8.1.1.txt[1.8.1.1],
Junio C Hamano9b2005a2013-01-01 00:10:52108 link:RelNotes/1.8.1.txt[1.8.1].
109
Junio C Hamanobabc36d2012-12-28 00:38:46110* link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
Junio C Hamano3b4382b2012-10-21 22:03:15111
112* release notes for
Junio C Hamanobabc36d2012-12-28 00:38:46113 link:RelNotes/1.8.0.3.txt[1.8.0.3],
Junio C Hamano2d7c5de2012-12-10 22:17:38114 link:RelNotes/1.8.0.2.txt[1.8.0.2],
Junio C Hamanob4e58b12012-11-26 03:13:06115 link:RelNotes/1.8.0.1.txt[1.8.0.1],
116 link:RelNotes/1.8.0.txt[1.8.0].
Junio C Hamano3b4382b2012-10-21 22:03:15117
Junio C Hamano14d688f2012-10-17 20:33:21118* link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
Junio C Hamano0862f092012-08-20 01:44:17119
120* release notes for
Junio C Hamano14d688f2012-10-17 20:33:21121 link:RelNotes/1.7.12.4.txt[1.7.12.4],
Junio C Hamanof9ad45c2012-10-08 20:01:27122 link:RelNotes/1.7.12.3.txt[1.7.12.3],
Junio C Hamano9cdfecf2012-09-30 07:38:36123 link:RelNotes/1.7.12.2.txt[1.7.12.2],
Junio C Hamano8ce35d72012-09-18 22:30:42124 link:RelNotes/1.7.12.1.txt[1.7.12.1],
Junio C Hamano0862f092012-08-20 01:44:17125 link:RelNotes/1.7.12.txt[1.7.12].
126
Junio C Hamanoa3cfb762012-09-15 05:32:14127* link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
Junio C Hamanobec9cd12012-04-06 17:53:42128
129* release notes for
Junio C Hamanoa3cfb762012-09-15 05:32:14130 link:RelNotes/1.7.11.7.txt[1.7.11.7],
Junio C Hamano693e7092012-09-12 22:56:53131 link:RelNotes/1.7.11.6.txt[1.7.11.6],
Junio C Hamanod7f343f2012-08-15 22:24:50132 link:RelNotes/1.7.11.5.txt[1.7.11.5],
Junio C Hamanocde594a2012-07-30 22:07:30133 link:RelNotes/1.7.11.4.txt[1.7.11.4],
Junio C Hamanobb300642012-07-22 21:09:14134 link:RelNotes/1.7.11.3.txt[1.7.11.3],
Junio C Hamano9e521622012-07-11 22:14:12135 link:RelNotes/1.7.11.2.txt[1.7.11.2],
Junio C Hamano7f2b3cb2012-06-22 22:42:39136 link:RelNotes/1.7.11.1.txt[1.7.11.1],
Junio C Hamano010705a2012-06-19 23:37:26137 link:RelNotes/1.7.11.txt[1.7.11].
138
139* link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
140
141* release notes for
142 link:RelNotes/1.7.10.5.txt[1.7.10.5],
Junio C Hamano4e804872012-06-03 23:29:27143 link:RelNotes/1.7.10.4.txt[1.7.10.4],
Junio C Hamanoe5fc3c32012-06-01 21:54:19144 link:RelNotes/1.7.10.3.txt[1.7.10.3],
Junio C Hamano4fdb4d62012-05-11 20:03:49145 link:RelNotes/1.7.10.2.txt[1.7.10.2],
Junio C Hamano0aadbc32012-05-02 04:48:23146 link:RelNotes/1.7.10.1.txt[1.7.10.1],
Junio C Hamanobec9cd12012-04-06 17:53:42147 link:RelNotes/1.7.10.txt[1.7.10].
148
Junio C Hamano67cc20a2012-04-26 20:02:20149* link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
Junio C Hamano12bf4712012-01-27 20:58:06150
151* release notes for
Junio C Hamano67cc20a2012-04-26 20:02:20152 link:RelNotes/1.7.9.7.txt[1.7.9.7],
Junio C Hamano6f8d9a92012-04-04 00:35:16153 link:RelNotes/1.7.9.6.txt[1.7.9.6],
Junio C Hamano0ff98162012-03-31 18:19:09154 link:RelNotes/1.7.9.5.txt[1.7.9.5],
Junio C Hamano743dec72012-03-12 23:43:17155 link:RelNotes/1.7.9.4.txt[1.7.9.4],
Junio C Hamanoa5a62162012-03-05 23:25:43156 link:RelNotes/1.7.9.3.txt[1.7.9.3],
Junio C Hamano83002c92012-02-23 02:23:54157 link:RelNotes/1.7.9.2.txt[1.7.9.2],
Junio C Hamanoad0c76a2012-02-14 18:53:55158 link:RelNotes/1.7.9.1.txt[1.7.9.1],
Junio C Hamano12bf4712012-01-27 20:58:06159 link:RelNotes/1.7.9.txt[1.7.9].
160
Junio C Hamano67cc20a2012-04-26 20:02:20161* link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
Junio C Hamanoa4a39922011-12-02 19:55:57162
163* release notes for
Junio C Hamano67cc20a2012-04-26 20:02:20164 link:RelNotes/1.7.8.6.txt[1.7.8.6],
Junio C Hamano6f8d9a92012-04-04 00:35:16165 link:RelNotes/1.7.8.5.txt[1.7.8.5],
Junio C Hamanobfeab4e2012-01-19 00:51:27166 link:RelNotes/1.7.8.4.txt[1.7.8.4],
Junio C Hamano4fd24422012-01-06 21:52:43167 link:RelNotes/1.7.8.3.txt[1.7.8.3],
168 link:RelNotes/1.7.8.2.txt[1.7.8.2],
169 link:RelNotes/1.7.8.1.txt[1.7.8.1],
Junio C Hamanoa4a39922011-12-02 19:55:57170 link:RelNotes/1.7.8.txt[1.7.8].
171
Junio C Hamano67cc20a2012-04-26 20:02:20172* link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
Junio C Hamanoc94277e2011-09-30 21:43:43173
174* release notes for
Junio C Hamano67cc20a2012-04-26 20:02:20175 link:RelNotes/1.7.7.7.txt[1.7.7.7],
Junio C Hamanobfeab4e2012-01-19 00:51:27176 link:RelNotes/1.7.7.6.txt[1.7.7.6],
Junio C Hamano78b3a4e2011-12-15 23:48:40177 link:RelNotes/1.7.7.5.txt[1.7.7.5],
178 link:RelNotes/1.7.7.4.txt[1.7.7.4],
179 link:RelNotes/1.7.7.3.txt[1.7.7.3],
180 link:RelNotes/1.7.7.2.txt[1.7.7.2],
Junio C Hamano6231f822011-10-24 05:18:52181 link:RelNotes/1.7.7.1.txt[1.7.7.1],
Junio C Hamanoc94277e2011-09-30 21:43:43182 link:RelNotes/1.7.7.txt[1.7.7].
183
Junio C Hamanoe382f502012-02-06 17:17:06184* link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
Junio C Hamano7444c602011-06-26 22:42:48185
186* release notes for
Junio C Hamanoe382f502012-02-06 17:17:06187 link:RelNotes/1.7.6.6.txt[1.7.6.6],
Junio C Hamano78b3a4e2011-12-15 23:48:40188 link:RelNotes/1.7.6.5.txt[1.7.6.5],
Junio C Hamano38a96a42011-09-23 23:22:52189 link:RelNotes/1.7.6.4.txt[1.7.6.4],
Junio C Hamano7bd050f2011-09-22 06:32:22190 link:RelNotes/1.7.6.3.txt[1.7.6.3],
191 link:RelNotes/1.7.6.2.txt[1.7.6.2],
192 link:RelNotes/1.7.6.1.txt[1.7.6.1],
Junio C Hamano7444c602011-06-26 22:42:48193 link:RelNotes/1.7.6.txt[1.7.6].
194
Junio C Hamanoe5dff952011-06-01 22:52:44195* link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
Junio C Hamanoa3d4ca22011-04-24 18:09:52196
197* release notes for
Junio C Hamanoe5dff952011-06-01 22:52:44198 link:RelNotes/1.7.5.4.txt[1.7.5.4],
Junio C Hamano90b56532011-05-26 22:39:49199 link:RelNotes/1.7.5.3.txt[1.7.5.3],
Junio C Hamano300d4362011-05-20 05:46:10200 link:RelNotes/1.7.5.2.txt[1.7.5.2],
Junio C Hamanob77f8192011-05-05 01:30:38201 link:RelNotes/1.7.5.1.txt[1.7.5.1],
Junio C Hamanoa3d4ca22011-04-24 18:09:52202 link:RelNotes/1.7.5.txt[1.7.5].
203
Junio C Hamano0a901522011-04-19 22:42:05204* link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
Junio C Hamano103b5722011-01-31 05:03:45205
206* release notes for
Junio C Hamano0a901522011-04-19 22:42:05207 link:RelNotes/1.7.4.5.txt[1.7.4.5],
Junio C Hamanoee3adc32011-04-06 19:53:38208 link:RelNotes/1.7.4.4.txt[1.7.4.4],
Junio C Hamanoa7e3c512011-04-03 08:34:11209 link:RelNotes/1.7.4.3.txt[1.7.4.3],
210 link:RelNotes/1.7.4.2.txt[1.7.4.2],
Junio C Hamano51f3c5a2011-02-12 00:41:17211 link:RelNotes/1.7.4.1.txt[1.7.4.1],
Junio C Hamano103b5722011-01-31 05:03:45212 link:RelNotes/1.7.4.txt[1.7.4].
213
Junio C Hamanoe0552e42011-01-06 00:34:47214* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
Junio C Hamanoac752fa2010-09-19 00:01:00215
216* release notes for
Junio C Hamanoe0552e42011-01-06 00:34:47217 link:RelNotes/1.7.3.5.txt[1.7.3.5],
Junio C Hamano7eeb87e2010-12-16 05:58:59218 link:RelNotes/1.7.3.4.txt[1.7.3.4],
Junio C Hamano1aa55142010-12-10 02:04:44219 link:RelNotes/1.7.3.3.txt[1.7.3.3],
Junio C Hamanod2179ef2010-10-22 04:12:17220 link:RelNotes/1.7.3.2.txt[1.7.3.2],
Junio C Hamano3b4609d2010-09-30 00:04:34221 link:RelNotes/1.7.3.1.txt[1.7.3.1],
Junio C Hamanoac752fa2010-09-19 00:01:00222 link:RelNotes/1.7.3.txt[1.7.3].
223
Junio C Hamano0d75e872010-12-17 06:57:26224* link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
Junio C Hamano08acb732010-07-21 21:58:33225
226* release notes for
Junio C Hamano0d75e872010-12-17 06:57:26227 link:RelNotes/1.7.2.5.txt[1.7.2.5],
Junio C Hamano1aa55142010-12-10 02:04:44228 link:RelNotes/1.7.2.4.txt[1.7.2.4],
Junio C Hamano05d16ca2010-09-10 21:57:17229 link:RelNotes/1.7.2.3.txt[1.7.2.3],
230 link:RelNotes/1.7.2.2.txt[1.7.2.2],
231 link:RelNotes/1.7.2.1.txt[1.7.2.1],
232 link:RelNotes/1.7.2.txt[1.7.2].
Junio C Hamano08acb732010-07-21 21:58:33233
Junio C Hamano0d75e872010-12-17 06:57:26234* link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
Junio C Hamanofc5d7352010-04-24 02:59:11235
236* release notes for
Junio C Hamano0d75e872010-12-17 06:57:26237 link:RelNotes/1.7.1.4.txt[1.7.1.4],
Junio C Hamano1aa55142010-12-10 02:04:44238 link:RelNotes/1.7.1.3.txt[1.7.1.3],
Junio C Hamano05d16ca2010-09-10 21:57:17239 link:RelNotes/1.7.1.2.txt[1.7.1.2],
240 link:RelNotes/1.7.1.1.txt[1.7.1.1],
241 link:RelNotes/1.7.1.txt[1.7.1].
Junio C Hamanofc5d7352010-04-24 02:59:11242
Junio C Hamano0d75e872010-12-17 06:57:26243* link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
Junio C Hamanodca34822010-02-13 01:02:52244
245* release notes for
Junio C Hamano0d75e872010-12-17 06:57:26246 link:RelNotes/1.7.0.9.txt[1.7.0.9],
Junio C Hamano1aa55142010-12-10 02:04:44247 link:RelNotes/1.7.0.8.txt[1.7.0.8],
Junio C Hamano05d16ca2010-09-10 21:57:17248 link:RelNotes/1.7.0.7.txt[1.7.0.7],
249 link:RelNotes/1.7.0.6.txt[1.7.0.6],
250 link:RelNotes/1.7.0.5.txt[1.7.0.5],
251 link:RelNotes/1.7.0.4.txt[1.7.0.4],
252 link:RelNotes/1.7.0.3.txt[1.7.0.3],
253 link:RelNotes/1.7.0.2.txt[1.7.0.2],
254 link:RelNotes/1.7.0.1.txt[1.7.0.1],
255 link:RelNotes/1.7.0.txt[1.7.0].
Junio C Hamanodca34822010-02-13 01:02:52256
Junio C Hamano0d75e872010-12-17 06:57:26257* link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
Junio C Hamanof3a01ab2009-12-24 00:30:34258
259* release notes for
Junio C Hamano0d75e872010-12-17 06:57:26260 link:RelNotes/1.6.6.3.txt[1.6.6.3],
Junio C Hamano05d16ca2010-09-10 21:57:17261 link:RelNotes/1.6.6.2.txt[1.6.6.2],
262 link:RelNotes/1.6.6.1.txt[1.6.6.1],
263 link:RelNotes/1.6.6.txt[1.6.6].
Junio C Hamanof3a01ab2009-12-24 00:30:34264
Junio C Hamano0d75e872010-12-17 06:57:26265* link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
Junio C Hamano77e01e32009-10-11 01:57:34266
267* release notes for
Junio C Hamano0d75e872010-12-17 06:57:26268 link:RelNotes/1.6.5.9.txt[1.6.5.9],
Junio C Hamano05d16ca2010-09-10 21:57:17269 link:RelNotes/1.6.5.8.txt[1.6.5.8],
270 link:RelNotes/1.6.5.7.txt[1.6.5.7],
271 link:RelNotes/1.6.5.6.txt[1.6.5.6],
272 link:RelNotes/1.6.5.5.txt[1.6.5.5],
273 link:RelNotes/1.6.5.4.txt[1.6.5.4],
274 link:RelNotes/1.6.5.3.txt[1.6.5.3],
275 link:RelNotes/1.6.5.2.txt[1.6.5.2],
276 link:RelNotes/1.6.5.1.txt[1.6.5.1],
277 link:RelNotes/1.6.5.txt[1.6.5].
Junio C Hamano77e01e32009-10-11 01:57:34278
Junio C Hamano0d75e872010-12-17 06:57:26279* link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
Junio C Hamano3bd4ce32009-06-04 07:18:09280
281* release notes for
Junio C Hamano0d75e872010-12-17 06:57:26282 link:RelNotes/1.6.4.5.txt[1.6.4.5],
Junio C Hamano05d16ca2010-09-10 21:57:17283 link:RelNotes/1.6.4.4.txt[1.6.4.4],
284 link:RelNotes/1.6.4.3.txt[1.6.4.3],
285 link:RelNotes/1.6.4.2.txt[1.6.4.2],
286 link:RelNotes/1.6.4.1.txt[1.6.4.1],
287 link:RelNotes/1.6.4.txt[1.6.4].
Junio C Hamano543f8d62009-07-29 08:35:21288
289* link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
290
291* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17292 link:RelNotes/1.6.3.4.txt[1.6.3.4],
293 link:RelNotes/1.6.3.3.txt[1.6.3.3],
294 link:RelNotes/1.6.3.2.txt[1.6.3.2],
295 link:RelNotes/1.6.3.1.txt[1.6.3.1],
296 link:RelNotes/1.6.3.txt[1.6.3].
Junio C Hamanoa9eca4e2009-03-04 08:29:59297
298* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17299 link:RelNotes/1.6.2.5.txt[1.6.2.5],
300 link:RelNotes/1.6.2.4.txt[1.6.2.4],
301 link:RelNotes/1.6.2.3.txt[1.6.2.3],
302 link:RelNotes/1.6.2.2.txt[1.6.2.2],
303 link:RelNotes/1.6.2.1.txt[1.6.2.1],
304 link:RelNotes/1.6.2.txt[1.6.2].
Junio C Hamanoa9eca4e2009-03-04 08:29:59305
Junio C Hamanoe5bf6c12009-02-07 21:43:10306* link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
Junio C Hamano13016de2008-12-25 05:46:57307
308* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17309 link:RelNotes/1.6.1.3.txt[1.6.1.3],
310 link:RelNotes/1.6.1.2.txt[1.6.1.2],
311 link:RelNotes/1.6.1.1.txt[1.6.1.1],
312 link:RelNotes/1.6.1.txt[1.6.1].
Junio C Hamano13016de2008-12-25 05:46:57313
Junio C Hamano54bf1e22008-12-20 06:30:11314* link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
Junio C Hamanoc6e59502008-08-17 21:05:51315
316* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17317 link:RelNotes/1.6.0.6.txt[1.6.0.6],
318 link:RelNotes/1.6.0.5.txt[1.6.0.5],
319 link:RelNotes/1.6.0.4.txt[1.6.0.4],
320 link:RelNotes/1.6.0.3.txt[1.6.0.3],
321 link:RelNotes/1.6.0.2.txt[1.6.0.2],
322 link:RelNotes/1.6.0.1.txt[1.6.0.1],
323 link:RelNotes/1.6.0.txt[1.6.0].
Junio C Hamanoc6e59502008-08-17 21:05:51324
Junio C Hamano54bf1e22008-12-20 06:30:11325* link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
Junio C Hamano11fe55c2008-06-18 23:14:56326
327* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17328 link:RelNotes/1.5.6.6.txt[1.5.6.6],
329 link:RelNotes/1.5.6.5.txt[1.5.6.5],
330 link:RelNotes/1.5.6.4.txt[1.5.6.4],
331 link:RelNotes/1.5.6.3.txt[1.5.6.3],
332 link:RelNotes/1.5.6.2.txt[1.5.6.2],
333 link:RelNotes/1.5.6.1.txt[1.5.6.1],
334 link:RelNotes/1.5.6.txt[1.5.6].
Junio C Hamano11fe55c2008-06-18 23:14:56335
Junio C Hamano54bf1e22008-12-20 06:30:11336* link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
Junio C Hamano0d0679d2008-04-08 06:15:46337
338* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17339 link:RelNotes/1.5.5.6.txt[1.5.5.6],
340 link:RelNotes/1.5.5.5.txt[1.5.5.5],
341 link:RelNotes/1.5.5.4.txt[1.5.5.4],
342 link:RelNotes/1.5.5.3.txt[1.5.5.3],
343 link:RelNotes/1.5.5.2.txt[1.5.5.2],
344 link:RelNotes/1.5.5.1.txt[1.5.5.1],
345 link:RelNotes/1.5.5.txt[1.5.5].
Junio C Hamano0d0679d2008-04-08 06:15:46346
Junio C Hamano54bf1e22008-12-20 06:30:11347* link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
Junio C Hamano7b9b4262008-02-02 06:48:39348
349* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17350 link:RelNotes/1.5.4.7.txt[1.5.4.7],
351 link:RelNotes/1.5.4.6.txt[1.5.4.6],
352 link:RelNotes/1.5.4.5.txt[1.5.4.5],
353 link:RelNotes/1.5.4.4.txt[1.5.4.4],
354 link:RelNotes/1.5.4.3.txt[1.5.4.3],
355 link:RelNotes/1.5.4.2.txt[1.5.4.2],
356 link:RelNotes/1.5.4.1.txt[1.5.4.1],
357 link:RelNotes/1.5.4.txt[1.5.4].
Junio C Hamano7b9b4262008-02-02 06:48:39358
Junio C Hamano4e272312008-01-08 09:13:21359* link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
Junio C Hamanoa75069c2007-09-04 01:19:24360
361* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17362 link:RelNotes/1.5.3.8.txt[1.5.3.8],
363 link:RelNotes/1.5.3.7.txt[1.5.3.7],
364 link:RelNotes/1.5.3.6.txt[1.5.3.6],
365 link:RelNotes/1.5.3.5.txt[1.5.3.5],
366 link:RelNotes/1.5.3.4.txt[1.5.3.4],
367 link:RelNotes/1.5.3.3.txt[1.5.3.3],
368 link:RelNotes/1.5.3.2.txt[1.5.3.2],
369 link:RelNotes/1.5.3.1.txt[1.5.3.1],
370 link:RelNotes/1.5.3.txt[1.5.3].
Junio C Hamano75485c82007-05-19 04:20:33371
Junio C Hamano9eb57532008-06-26 06:33:46372* link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
373
Junio C Hamanoed7f4f62007-05-20 09:09:09374* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17375 link:RelNotes/1.5.2.5.txt[1.5.2.5],
376 link:RelNotes/1.5.2.4.txt[1.5.2.4],
377 link:RelNotes/1.5.2.3.txt[1.5.2.3],
378 link:RelNotes/1.5.2.2.txt[1.5.2.2],
379 link:RelNotes/1.5.2.1.txt[1.5.2.1],
380 link:RelNotes/1.5.2.txt[1.5.2].
Junio C Hamanoed7f4f62007-05-20 09:09:09381
382* link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
383
384* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17385 link:RelNotes/1.5.1.6.txt[1.5.1.6],
386 link:RelNotes/1.5.1.5.txt[1.5.1.5],
387 link:RelNotes/1.5.1.4.txt[1.5.1.4],
388 link:RelNotes/1.5.1.3.txt[1.5.1.3],
389 link:RelNotes/1.5.1.2.txt[1.5.1.2],
390 link:RelNotes/1.5.1.1.txt[1.5.1.1],
391 link:RelNotes/1.5.1.txt[1.5.1].
Junio C Hamano91d44c52007-05-09 07:16:07392
Junio C Hamanoa9b8d242007-05-19 04:51:55393* link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
Junio C Hamano91d44c52007-05-09 07:16:07394
Junio C Hamanoed7f4f62007-05-20 09:09:09395* release notes for
Junio C Hamano05d16ca2010-09-10 21:57:17396 link:RelNotes/1.5.0.7.txt[1.5.0.7],
397 link:RelNotes/1.5.0.6.txt[1.5.0.6],
398 link:RelNotes/1.5.0.5.txt[1.5.0.5],
399 link:RelNotes/1.5.0.3.txt[1.5.0.3],
400 link:RelNotes/1.5.0.2.txt[1.5.0.2],
401 link:RelNotes/1.5.0.1.txt[1.5.0.1],
402 link:RelNotes/1.5.0.txt[1.5.0].
Junio C Hamanoe90436a2007-04-22 07:22:13403
Junio C Hamanoa9b8d242007-05-19 04:51:55404* documentation for release link:v1.4.4.4/git.html[1.4.4.4],
405 link:v1.3.3/git.html[1.3.3],
406 link:v1.2.6/git.html[1.2.6],
407 link:v1.0.13/git.html[1.0.13].
Junio C Hamano9d52e572007-02-13 23:48:20408
409============
410
411endif::stalenotes[]
412
Junio C Hamano1a4e8412005-12-27 08:17:23413OPTIONS
414-------
415--version::
Junio C Hamano076ffcc2013-02-06 05:13:21416Prints the Git suite version that the 'git' program came from.
Junio C Hamano1a4e8412005-12-27 08:17:23417
418--help::
Junio C Hamano01078922006-03-10 00:31:47419Prints the synopsis and a list of the most commonly used
Junio C Hamano58256872007-12-04 08:31:13420commands. If the option '--all' or '-a' is given then all
Junio C Hamano076ffcc2013-02-06 05:13:21421available commands are printed. If a Git command is named this
Junio C Hamano58256872007-12-04 08:31:13422option will bring up the manual page for that command.
Junio C Hamano0c0da5f2007-12-13 02:45:30423+
424Other options are available to control how the manual page is
Junio C Hamano35738e82008-01-07 07:55:46425displayed. See linkgit:git-help[1] for more information,
Junio C Hamanoba4b9282008-07-06 05:20:31426because `git --help ...` is converted internally into `git
427help ...`.
Junio C Hamano1a4e8412005-12-27 08:17:23428
Junio C Hamano79f4c7c2013-09-20 21:03:37429-C <path>::
430Run as if git was started in '<path>' instead of the current working
431directory. When multiple `-C` options are given, each subsequent
432non-absolute `-C <path>` is interpreted relative to the preceding `-C
433<path>`.
434+
435This option affects options that expect path name like `--git-dir` and
436`--work-tree` in that their interpretations of the path names would be
437made relative to the working directory caused by the `-C` option. For
438example the following invocations are equivalent:
439
440 git --git-dir=a.git --work-tree=b -C c status
441 git --git-dir=c/a.git --work-tree=c/b status
442
Junio C Hamanocc7636a2010-05-21 14:57:53443-c <name>=<value>::
444Pass a configuration parameter to the command. The value
445given will override values from configuration files.
446The <name> is expected in the same format as listed by
447'git config' (subkeys separated by dots).
448
Junio C Hamanod2179ef2010-10-22 04:12:17449--exec-path[=<path>]::
Junio C Hamano076ffcc2013-02-06 05:13:21450Path to wherever your core Git programs are installed.
Junio C Hamano1a4e8412005-12-27 08:17:23451This can also be controlled by setting the GIT_EXEC_PATH
Junio C Hamanoba4b9282008-07-06 05:20:31452environment variable. If no path is given, 'git' will print
Junio C Hamano1a4e8412005-12-27 08:17:23453the current setting and then exit.
454
Junio C Hamanob4a9ede2009-04-08 07:36:32455--html-path::
Junio C Hamano076ffcc2013-02-06 05:13:21456Print the path, without trailing slash, where Git's HTML
Junio C Hamano5f2627d2011-05-06 20:23:48457documentation is installed and exit.
458
459--man-path::
460Print the manpath (see `man(1)`) for the man pages for
Junio C Hamano076ffcc2013-02-06 05:13:21461this version of Git and exit.
Junio C Hamano5f2627d2011-05-06 20:23:48462
463--info-path::
464Print the path where the Info files documenting this
Junio C Hamano076ffcc2013-02-06 05:13:21465version of Git are installed and exit.
Junio C Hamanob4a9ede2009-04-08 07:36:32466
Junio C Hamanoeb415992008-06-08 22:49:47467-p::
468--paginate::
Junio C Hamano4aa0bcc2010-03-03 05:13:12469Pipe all output into 'less' (or if set, $PAGER) if standard
470output is a terminal. This overrides the `pager.<cmd>`
471configuration options (see the "Configuration Mechanism" section
472below).
Junio C Hamanof870ef82006-07-29 09:10:13473
Junio C Hamanocae86272007-08-21 02:20:49474--no-pager::
Junio C Hamano076ffcc2013-02-06 05:13:21475Do not pipe Git output into a pager.
Junio C Hamanocae86272007-08-21 02:20:49476
Junio C Hamanof870ef82006-07-29 09:10:13477--git-dir=<path>::
478Set the path to the repository. This can also be controlled by
Junio C Hamano7d575a52008-04-30 08:45:27479setting the GIT_DIR environment variable. It can be an absolute
480path or relative path to current working directory.
Junio C Hamanof870ef82006-07-29 09:10:13481
Junio C Hamanod526ba92007-07-02 00:17:42482--work-tree=<path>::
Junio C Hamano80d58462011-01-24 22:52:52483Set the path to the working tree. It can be an absolute path
484or a path relative to the current working directory.
Junio C Hamanod526ba92007-07-02 00:17:42485This can also be controlled by setting the GIT_WORK_TREE
486environment variable and the core.worktree configuration
Junio C Hamano80d58462011-01-24 22:52:52487variable (see core.worktree in linkgit:git-config[1] for a
488more detailed discussion).
Junio C Hamanod526ba92007-07-02 00:17:42489
Junio C Hamanof7279012011-08-18 06:13:13490--namespace=<path>::
Junio C Hamano076ffcc2013-02-06 05:13:21491Set the Git namespace. See linkgit:gitnamespaces[7] for more
Junio C Hamanof7279012011-08-18 06:13:13492details. Equivalent to setting the `GIT_NAMESPACE` environment
493variable.
494
Junio C Hamanof870ef82006-07-29 09:10:13495--bare::
Junio C Hamanoc435b1c2007-08-28 06:25:35496Treat the repository as a bare repository. If GIT_DIR
497environment is not set, it is set to the current working
498directory.
499
Junio C Hamano3d23a0a2009-10-19 08:04:30500--no-replace-objects::
Junio C Hamano076ffcc2013-02-06 05:13:21501Do not use replacement refs to replace Git objects. See
Junio C Hamano3d23a0a2009-10-19 08:04:30502linkgit:git-replace[1] for more information.
503
Junio C Hamanoabad6da2013-01-06 09:06:32504--literal-pathspecs::
Junio C Hamano8eac2682013-09-09 22:35:20505Treat pathspecs literally (i.e. no globbing, no pathspec magic).
506This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
Junio C Hamanoabad6da2013-01-06 09:06:32507variable to `1`.
508
Junio C Hamanob9acecb2013-10-16 01:18:56509--glob-pathspecs::
Junio C Hamano8eac2682013-09-09 22:35:20510Add "glob" magic to all pathspec. This is equivalent to setting
511the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
512globbing on individual pathspecs can be done using pathspec
513magic ":(literal)"
514
Junio C Hamanob9acecb2013-10-16 01:18:56515--noglob-pathspecs::
Junio C Hamano8eac2682013-09-09 22:35:20516Add "literal" magic to all pathspec. This is equivalent to setting
517the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
518globbing on individual pathspecs can be done using pathspec
519magic ":(glob)"
520
Junio C Hamanob9acecb2013-10-16 01:18:56521--icase-pathspecs::
Junio C Hamano8eac2682013-09-09 22:35:20522Add "icase" magic to all pathspec. This is equivalent to setting
523the `GIT_ICASE_PATHSPECS` environment variable to `1`.
Junio C Hamano1a4e8412005-12-27 08:17:23524
Junio C Hamanoe27fb932006-04-03 05:34:10525GIT COMMANDS
526------------
Junio C Hamano1a4e8412005-12-27 08:17:23527
Junio C Hamano076ffcc2013-02-06 05:13:21528We divide Git into high level ("porcelain") commands and low level
Junio C Hamanoe27fb932006-04-03 05:34:10529("plumbing") commands.
Junio C Hamano1a4e8412005-12-27 08:17:23530
Junio C Hamanob19b4f02006-10-29 20:47:22531High-level commands (porcelain)
532-------------------------------
533
534We separate the porcelain commands into the main commands and some
535ancillary user utilities.
536
537Main porcelain commands
538~~~~~~~~~~~~~~~~~~~~~~~
539
Junio C Hamano7c73c662007-01-19 00:37:50540include::cmds-mainporcelain.txt[]
Junio C Hamanob19b4f02006-10-29 20:47:22541
542Ancillary Commands
543~~~~~~~~~~~~~~~~~~
544Manipulators:
545
Junio C Hamano7c73c662007-01-19 00:37:50546include::cmds-ancillarymanipulators.txt[]
Junio C Hamanob19b4f02006-10-29 20:47:22547
548Interrogators:
549
Junio C Hamano7c73c662007-01-19 00:37:50550include::cmds-ancillaryinterrogators.txt[]
Junio C Hamanob19b4f02006-10-29 20:47:22551
Junio C Hamano4ad294b2007-01-20 02:22:50552
553Interacting with Others
554~~~~~~~~~~~~~~~~~~~~~~~
555
556These commands are to interact with foreign SCM and with other
557people via patch over e-mail.
558
559include::cmds-foreignscminterface.txt[]
560
561
Junio C Hamanoe27fb932006-04-03 05:34:10562Low-level commands (plumbing)
563-----------------------------
Junio C Hamano1a4e8412005-12-27 08:17:23564
Junio C Hamano076ffcc2013-02-06 05:13:21565Although Git includes its
Junio C Hamanoe27fb932006-04-03 05:34:10566own porcelain layer, its low-level commands are sufficient to support
567development of alternative porcelains. Developers of such porcelains
Junio C Hamano35738e82008-01-07 07:55:46568might start by reading about linkgit:git-update-index[1] and
569linkgit:git-read-tree[1].
Junio C Hamano1a4e8412005-12-27 08:17:23570
Junio C Hamano4ad294b2007-01-20 02:22:50571The interface (input, output, set of options and the semantics)
572to these low-level commands are meant to be a lot more stable
573than Porcelain level commands, because these commands are
574primarily for scripted use. The interface to Porcelain commands
575on the other hand are subject to change in order to improve the
576end user experience.
577
578The following description divides
579the low-level commands into commands that manipulate objects (in
Junio C Hamanoe27fb932006-04-03 05:34:10580the repository, index, and working tree), commands that interrogate and
581compare objects, and commands that move objects and references between
582repositories.
Junio C Hamano1a4e8412005-12-27 08:17:23583
Junio C Hamano4ad294b2007-01-20 02:22:50584
Junio C Hamano1a4e8412005-12-27 08:17:23585Manipulation commands
586~~~~~~~~~~~~~~~~~~~~~
Junio C Hamano1a4e8412005-12-27 08:17:23587
Junio C Hamano7c73c662007-01-19 00:37:50588include::cmds-plumbingmanipulators.txt[]
Junio C Hamano1a4e8412005-12-27 08:17:23589
590
591Interrogation commands
592~~~~~~~~~~~~~~~~~~~~~~
593
Junio C Hamano7c73c662007-01-19 00:37:50594include::cmds-plumbinginterrogators.txt[]
Junio C Hamano1a4e8412005-12-27 08:17:23595
596In general, the interrogate commands do not touch the files in
597the working tree.
598
599
600Synching repositories
601~~~~~~~~~~~~~~~~~~~~~
602
Junio C Hamano7c73c662007-01-19 00:37:50603include::cmds-synchingrepositories.txt[]
Junio C Hamano1a4e8412005-12-27 08:17:23604
Junio C Hamano27a128b2009-08-13 01:23:00605The following are helper commands used by the above; end users
Junio C Hamano4ad294b2007-01-20 02:22:50606typically do not use them directly.
607
608include::cmds-synchelpers.txt[]
609
610
611Internal helper commands
612~~~~~~~~~~~~~~~~~~~~~~~~
613
614These are internal helper commands used by other commands; end
615users typically do not use them directly.
616
617include::cmds-purehelpers.txt[]
618
Junio C Hamano1a4e8412005-12-27 08:17:23619
Junio C Hamano1a4e8412005-12-27 08:17:23620Configuration Mechanism
621-----------------------
622
Junio C Hamano2da4ac42013-02-19 00:41:17623Git uses a simple text format to store customizations that are per
624repository and are per user. Such a configuration file may look
625like this:
Junio C Hamano1a4e8412005-12-27 08:17:23626
627------------
628#
629# A '#' or ';' character indicates a comment.
630#
631
632; core variables
633[core]
634; Don't trust file modes
635filemode = false
636
637; user identity
638[user]
639name = "Junio C Hamano"
Junio C Hamano2da4ac42013-02-19 00:41:17640email = "gitster@pobox.com"
Junio C Hamano1a4e8412005-12-27 08:17:23641
642------------
643
644Various commands read from the configuration file and adjust
Junio C Hamano4aa0bcc2010-03-03 05:13:12645their operation accordingly. See linkgit:git-config[1] for a
Junio C Hamano2da4ac42013-02-19 00:41:17646list and more details about the configuration mechanism.
Junio C Hamano1a4e8412005-12-27 08:17:23647
648
649Identifier Terminology
650----------------------
651<object>::
652Indicates the object name for any type of object.
653
654<blob>::
655Indicates a blob object name.
656
657<tree>::
658Indicates a tree object name.
659
660<commit>::
661Indicates a commit object name.
662
663<tree-ish>::
664Indicates a tree, commit or tag object name. A
665command that takes a <tree-ish> argument ultimately wants to
666operate on a <tree> object but automatically dereferences
667<commit> and <tag> objects that point at a <tree>.
668
Junio C Hamano60f8aa82007-03-06 09:58:26669<commit-ish>::
670Indicates a commit or tag object name. A
671command that takes a <commit-ish> argument ultimately wants to
672operate on a <commit> object but automatically dereferences
673<tag> objects that point at a <commit>.
674
Junio C Hamano1a4e8412005-12-27 08:17:23675<type>::
676Indicates that an object type is required.
677Currently one of: `blob`, `tree`, `commit`, or `tag`.
678
679<file>::
680Indicates a filename - almost always relative to the
681root of the tree structure `GIT_INDEX_FILE` describes.
682
683Symbolic Identifiers
684--------------------
Junio C Hamano076ffcc2013-02-06 05:13:21685Any Git command accepting any <object> can also use the following
Junio C Hamano1a4e8412005-12-27 08:17:23686symbolic notation:
687
688HEAD::
Junio C Hamano360e3a12011-07-13 23:51:56689indicates the head of the current branch.
Junio C Hamano1a4e8412005-12-27 08:17:23690
691<tag>::
692a valid tag 'name'
Junio C Hamano360e3a12011-07-13 23:51:56693(i.e. a `refs/tags/<tag>` reference).
Junio C Hamano1a4e8412005-12-27 08:17:23694
695<head>::
696a valid head 'name'
Junio C Hamano360e3a12011-07-13 23:51:56697(i.e. a `refs/heads/<head>` reference).
Junio C Hamano1a4e8412005-12-27 08:17:23698
Junio C Hamanoff4b4312006-10-25 22:55:31699For a more complete list of ways to spell object names, see
Junio C Hamanoc27b7332010-10-14 04:37:28700"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
Junio C Hamanoff4b4312006-10-25 22:55:31701
Junio C Hamano1a4e8412005-12-27 08:17:23702
703File/Directory Structure
704------------------------
705
Junio C Hamanofce7c7e2008-07-02 03:06:38706Please see the linkgit:gitrepository-layout[5] document.
Junio C Hamano1a4e8412005-12-27 08:17:23707
Junio C Hamanofce7c7e2008-07-02 03:06:38708Read linkgit:githooks[5] for more details about each hook.
Junio C Hamano818f7d62006-03-26 01:49:30709
Junio C Hamano1a4e8412005-12-27 08:17:23710Higher level SCMs may provide and manage additional information in the
711`$GIT_DIR`.
712
713
714Terminology
715-----------
Junio C Hamanofce7c7e2008-07-02 03:06:38716Please see linkgit:gitglossary[7].
Junio C Hamano1a4e8412005-12-27 08:17:23717
718
719Environment Variables
720---------------------
Junio C Hamano076ffcc2013-02-06 05:13:21721Various Git commands use the following environment variables:
Junio C Hamano1a4e8412005-12-27 08:17:23722
Junio C Hamano076ffcc2013-02-06 05:13:21723The Git Repository
Junio C Hamano1a4e8412005-12-27 08:17:23724~~~~~~~~~~~~~~~~~~
Junio C Hamano076ffcc2013-02-06 05:13:21725These environment variables apply to 'all' core Git commands. Nb: it
Junio C Hamano1a4e8412005-12-27 08:17:23726is worth noting that they may be used/overridden by SCMS sitting above
Junio C Hamano076ffcc2013-02-06 05:13:21727Git so take care if using Cogito etc.
Junio C Hamano1a4e8412005-12-27 08:17:23728
729'GIT_INDEX_FILE'::
730This environment allows the specification of an alternate
731index file. If not specified, the default of `$GIT_DIR/index`
732is used.
733
Junio C Hamano81703b22014-03-14 22:00:27734'GIT_INDEX_VERSION'::
735This environment variable allows the specification of an index
736version for new repositories. It won't affect existing index
737files. By default index file version [23] is used.
738
Junio C Hamano1a4e8412005-12-27 08:17:23739'GIT_OBJECT_DIRECTORY'::
740If the object storage directory is specified via this
741environment variable then the sha1 directories are created
742underneath - otherwise the default `$GIT_DIR/objects`
743directory is used.
744
745'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
Junio C Hamano076ffcc2013-02-06 05:13:21746Due to the immutable nature of Git objects, old objects can be
Junio C Hamano1a4e8412005-12-27 08:17:23747archived into shared, read-only directories. This variable
Junio C Hamano05bf9c52008-07-03 09:21:58748specifies a ":" separated (on Windows ";" separated) list
Junio C Hamano076ffcc2013-02-06 05:13:21749of Git object directories which can be used to search for Git
Junio C Hamano05bf9c52008-07-03 09:21:58750objects. New objects will not be written to these directories.
Junio C Hamano1a4e8412005-12-27 08:17:23751
752'GIT_DIR'::
753If the 'GIT_DIR' environment variable is set then it
754specifies a path to use instead of the default `.git`
755for the base of the repository.
Junio C Hamano0b0417b2012-12-13 20:35:02756The '--git-dir' command-line option also sets this value.
Junio C Hamano1a4e8412005-12-27 08:17:23757
Junio C Hamanod526ba92007-07-02 00:17:42758'GIT_WORK_TREE'::
Junio C Hamanof1f5a7b2013-06-11 22:23:52759Set the path to the root of the working tree.
Junio C Hamanoe1aeb5e2014-06-06 19:16:29760This can also be controlled by the '--work-tree' command-line
Junio C Hamanod526ba92007-07-02 00:17:42761option and the core.worktree configuration variable.
762
Junio C Hamanof7279012011-08-18 06:13:13763'GIT_NAMESPACE'::
Junio C Hamano076ffcc2013-02-06 05:13:21764Set the Git namespace; see linkgit:gitnamespaces[7] for details.
Junio C Hamanof7279012011-08-18 06:13:13765The '--namespace' command-line option also sets this value.
766
Junio C Hamano15048272008-07-07 22:10:48767'GIT_CEILING_DIRECTORIES'::
Junio C Hamano68061622013-03-01 22:13:37768This should be a colon-separated list of absolute paths. If
769set, it is a list of directories that Git should not chdir up
770into while looking for a repository directory (useful for
771excluding slow-loading network directories). It will not
772exclude the current working directory or a GIT_DIR set on the
773command line or in the environment. Normally, Git has to read
774the entries in this list and resolve any symlink that
775might be present in order to compare them with the current
776directory. However, if even this access is slow, you
777can add an empty entry to the list to tell Git that the
778subsequent entries are not symlinks and needn't be resolved;
779e.g.,
780'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
Junio C Hamano15048272008-07-07 22:10:48781
Junio C Hamanocc7636a2010-05-21 14:57:53782'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
783When run in a directory that does not have ".git" repository
Junio C Hamano076ffcc2013-02-06 05:13:21784directory, Git tries to find such a directory in the parent
Junio C Hamanocc7636a2010-05-21 14:57:53785directories to find the top of the working tree, but by default it
786does not cross filesystem boundaries. This environment variable
Junio C Hamano076ffcc2013-02-06 05:13:21787can be set to true to tell Git not to stop at filesystem
Junio C Hamanocc7636a2010-05-21 14:57:53788boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
789an explicit repository directory set via 'GIT_DIR' or on the
790command line.
791
Junio C Hamano076ffcc2013-02-06 05:13:21792Git Commits
Junio C Hamano1a4e8412005-12-27 08:17:23793~~~~~~~~~~~
794'GIT_AUTHOR_NAME'::
795'GIT_AUTHOR_EMAIL'::
796'GIT_AUTHOR_DATE'::
797'GIT_COMMITTER_NAME'::
798'GIT_COMMITTER_EMAIL'::
Junio C Hamano469d60e2007-04-29 18:30:34799'GIT_COMMITTER_DATE'::
800'EMAIL'::
Junio C Hamano35738e82008-01-07 07:55:46801see linkgit:git-commit-tree[1]
Junio C Hamano1a4e8412005-12-27 08:17:23802
Junio C Hamano076ffcc2013-02-06 05:13:21803Git Diffs
Junio C Hamano1a4e8412005-12-27 08:17:23804~~~~~~~~~
805'GIT_DIFF_OPTS'::
Junio C Hamano1c437122006-11-28 02:22:25806Only valid setting is "--unified=??" or "-u??" to set the
807number of context lines shown when a unified diff is created.
808This takes precedence over any "-U" or "--unified" option
Junio C Hamano076ffcc2013-02-06 05:13:21809value passed on the Git diff command line.
Junio C Hamano1c437122006-11-28 02:22:25810
Junio C Hamano1a4e8412005-12-27 08:17:23811'GIT_EXTERNAL_DIFF'::
Junio C Hamano1c437122006-11-28 02:22:25812When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
813program named by it is called, instead of the diff invocation
814described above. For a path that is added, removed, or modified,
815 'GIT_EXTERNAL_DIFF' is called with 7 parameters:
816
817path old-file old-hex old-mode new-file new-hex new-mode
818+
819where:
820
821<old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
822 contents of <old|new>,
Junio C Hamanoe3f080d2013-04-22 02:27:13823<old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
Junio C Hamano1c437122006-11-28 02:22:25824<old|new>-mode:: are the octal representation of the file modes.
Junio C Hamano1c437122006-11-28 02:22:25825+
826The file parameters can point at the user's working file
827(e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
828when a new file is added), or a temporary file (e.g. `old-file` in the
829index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
830temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
831+
832For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
833parameter, <path>.
Junio C Hamanob1acf022013-12-28 00:33:16834+
835For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
836'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
837
838'GIT_DIFF_PATH_COUNTER'::
839A 1-based counter incremented by one for every path.
840
841'GIT_DIFF_PATH_TOTAL'::
842The total number of paths.
Junio C Hamano1a4e8412005-12-27 08:17:23843
Junio C Hamano7ccb9fd2006-07-15 01:38:40844other
845~~~~~
Junio C Hamano1e6e0062007-07-13 05:33:25846'GIT_MERGE_VERBOSITY'::
847A number controlling the amount of output shown by
848the recursive merge strategy. Overrides merge.verbosity.
Junio C Hamano35738e82008-01-07 07:55:46849See linkgit:git-merge[1]
Junio C Hamano1e6e0062007-07-13 05:33:25850
Junio C Hamano85e45fa2006-08-13 07:47:41851'GIT_PAGER'::
Junio C Hamanof6002a92007-07-20 10:28:22852This environment variable overrides `$PAGER`. If it is set
Junio C Hamano076ffcc2013-02-06 05:13:21853to an empty string or to the value "cat", Git will not launch
Junio C Hamano0551f6a2008-08-25 00:33:33854a pager. See also the `core.pager` option in
855linkgit:git-config[1].
Junio C Hamano85e45fa2006-08-13 07:47:41856
Junio C Hamano0ff98162012-03-31 18:19:09857'GIT_EDITOR'::
858This environment variable overrides `$EDITOR` and `$VISUAL`.
Junio C Hamano076ffcc2013-02-06 05:13:21859It is used by several Git commands when, on interactive mode,
Junio C Hamano0ff98162012-03-31 18:19:09860an editor is to be launched. See also linkgit:git-var[1]
861and the `core.editor` option in linkgit:git-config[1].
862
Junio C Hamano4cd1c0e2007-08-06 04:39:14863'GIT_SSH'::
Junio C Hamano1aa40d22010-01-21 17:46:43864If this environment variable is set then 'git fetch'
865and 'git push' will use this command instead
Junio C Hamanoba4b9282008-07-06 05:20:31866of 'ssh' when they need to connect to a remote system.
Junio C Hamano712be262013-03-26 22:45:56867The '$GIT_SSH' command will be given exactly two or
868four arguments: the 'username@host' (or just 'host')
869from the URL and the shell command to execute on that
870remote system, optionally preceded by '-p' (literally) and
871the 'port' from the URL when it specifies something other
872than the default SSH port.
Junio C Hamano4cd1c0e2007-08-06 04:39:14873+
874To pass options to the program that you want to list in GIT_SSH
875you will need to wrap the program and options into a shell script,
876then set GIT_SSH to refer to the shell script.
877+
878Usually it is easier to configure any desired options through your
879personal `.ssh/config` file. Please consult your ssh documentation
880for further details.
881
Junio C Hamano3fd7b262010-09-08 22:44:20882'GIT_ASKPASS'::
Junio C Hamano076ffcc2013-02-06 05:13:21883If this environment variable is set, then Git commands which need to
Junio C Hamano3fd7b262010-09-08 22:44:20884acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
Junio C Hamanoe1aeb5e2014-06-06 19:16:29885will call this program with a suitable prompt as command-line argument
Junio C Hamano3fd7b262010-09-08 22:44:20886and read the password from its STDOUT. See also the 'core.askpass'
887option in linkgit:git-config[1].
888
Junio C Hamanoeec745b2013-01-07 08:08:20889'GIT_CONFIG_NOSYSTEM'::
890Whether to skip reading settings from the system-wide
891`$(prefix)/etc/gitconfig` file. This environment variable can
892be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
893predictable environment for a picky script, or you can set it
894temporarily to avoid using a buggy `/etc/gitconfig` file while
895waiting for someone with sufficient permissions to fix it.
896
Junio C Hamano401939f2007-07-01 06:34:30897'GIT_FLUSH'::
898If this environment variable is set to "1", then commands such
Junio C Hamano1aa40d22010-01-21 17:46:43899as 'git blame' (in incremental mode), 'git rev-list', 'git log',
Junio C Hamano0241d052013-08-30 23:52:17900'git check-attr' and 'git check-ignore' will
Junio C Hamanoc7102962013-05-29 23:57:17901force a flush of the output stream after each record have been
902flushed. If this
Junio C Hamano401939f2007-07-01 06:34:30903variable is set to "0", the output of these commands will be done
904using completely buffered I/O. If this environment variable is
Junio C Hamano076ffcc2013-02-06 05:13:21905not set, Git will choose buffered or record-oriented flushing
Junio C Hamano401939f2007-07-01 06:34:30906based on whether stdout appears to be redirected to a file or not.
907
Junio C Hamano7ccb9fd2006-07-15 01:38:40908'GIT_TRACE'::
Junio C Hamanodbe51052014-07-22 19:39:51909Enables general trace messages, e.g. alias expansion, built-in
910command execution and external command execution.
911+
912If this variable is set to "1", "2" or "true" (comparison
913is case insensitive), trace messages will be printed to
914stderr.
915+
916If the variable is set to an integer value greater than 2
917and lower than 10 (strictly) then Git will interpret this
918value as an open file descriptor and will try to write the
919trace messages into this file descriptor.
920+
921Alternatively, if the variable is set to an absolute path
922(starting with a '/' character), Git will interpret this
923as a file path and will try to write the trace messages
924into it.
925+
926Unsetting the variable, or setting it to empty, "0" or
927"false" (case insensitive) disables trace messages.
Junio C Hamano7ccb9fd2006-07-15 01:38:40928
Junio C Hamanofa1d3492013-06-20 23:39:43929'GIT_TRACE_PACK_ACCESS'::
Junio C Hamanodbe51052014-07-22 19:39:51930Enables trace messages for all accesses to any packs. For each
Junio C Hamanofa1d3492013-06-20 23:39:43931access, the pack file name and an offset in the pack is
932recorded. This may be helpful for troubleshooting some
933pack-related performance problems.
Junio C Hamanodbe51052014-07-22 19:39:51934See 'GIT_TRACE' for available trace output options.
Junio C Hamanofa1d3492013-06-20 23:39:43935
936'GIT_TRACE_PACKET'::
Junio C Hamanodbe51052014-07-22 19:39:51937Enables trace messages for all packets coming in or out of a
938given program. This can help with debugging object negotiation
939or other protocol issues. Tracing is turned off at a packet
940starting with "PACK".
941See 'GIT_TRACE' for available trace output options.
942
943'GIT_TRACE_PERFORMANCE'::
944Enables performance related trace messages, e.g. total execution
945time of each Git command.
946See 'GIT_TRACE' for available trace output options.
947
948'GIT_TRACE_SETUP'::
949Enables trace messages printing the .git, working tree and current
950working directory after Git has completed its setup phase.
951See 'GIT_TRACE' for available trace output options.
952
953'GIT_TRACE_SHALLOW'::
954Enables trace messages that can help debugging fetching /
955cloning of shallow repositories.
956See 'GIT_TRACE' for available trace output options.
Junio C Hamanofa1d3492013-06-20 23:39:43957
Junio C Hamanoabad6da2013-01-06 09:06:32958GIT_LITERAL_PATHSPECS::
Junio C Hamano076ffcc2013-02-06 05:13:21959Setting this variable to `1` will cause Git to treat all
Junio C Hamanoabad6da2013-01-06 09:06:32960pathspecs literally, rather than as glob patterns. For example,
961running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
962for commits that touch the path `*.c`, not any paths that the
963glob `*.c` matches. You might want this if you are feeding
Junio C Hamano076ffcc2013-02-06 05:13:21964literal paths to Git (e.g., paths previously given to you by
Junio C Hamanoabad6da2013-01-06 09:06:32965`git ls-tree`, `--raw` diff output, etc).
966
Junio C Hamano8eac2682013-09-09 22:35:20967GIT_GLOB_PATHSPECS::
968Setting this variable to `1` will cause Git to treat all
969pathspecs as glob patterns (aka "glob" magic).
970
971GIT_NOGLOB_PATHSPECS::
972Setting this variable to `1` will cause Git to treat all
973pathspecs as literal (aka "literal" magic).
974
975GIT_ICASE_PATHSPECS::
976Setting this variable to `1` will cause Git to treat all
977pathspecs as case-insensitive.
978
Junio C Hamanoaef76442013-10-18 22:11:27979'GIT_REFLOG_ACTION'::
980When a ref is updated, reflog entries are created to keep
981track of the reason why the ref was updated (which is
982typically the name of the high-level command that updated
983the ref), in addition to the old and new values of the ref.
984A scripted Porcelain command can use set_reflog_action
985helper function in `git-sh-setup` to set its name to this
986variable when it is invoked as the top level command by the
987end user, to be recorded in the body of the reflog.
988
Junio C Hamanoabad6da2013-01-06 09:06:32989
Junio C Hamano1a4e8412005-12-27 08:17:23990Discussion[[Discussion]]
991------------------------
Junio C Hamano597ffcf2007-09-17 17:33:15992
993More detail on the following is available from the
Junio C Hamano076ffcc2013-02-06 05:13:21994link:user-manual.html#git-concepts[Git concepts chapter of the
Junio C Hamanofce7c7e2008-07-02 03:06:38995user-manual] and linkgit:gitcore-tutorial[7].
Junio C Hamano597ffcf2007-09-17 17:33:15996
Junio C Hamano076ffcc2013-02-06 05:13:21997A Git project normally consists of a working directory with a ".git"
Junio C Hamano597ffcf2007-09-17 17:33:15998subdirectory at the top level. The .git directory contains, among other
999things, a compressed object database representing the complete history
1000of the project, an "index" file which links that history to the current
1001contents of the working tree, and named pointers into that history such
1002as tags and branch heads.
1003
1004The object database contains objects of three main types: blobs, which
1005hold file data; trees, which point to blobs and other trees to build up
Junio C Hamanofe986052007-12-19 07:33:381006directory hierarchies; and commits, which each reference a single tree
Junio C Hamano597ffcf2007-09-17 17:33:151007and some number of parent commits.
1008
1009The commit, equivalent to what other systems call a "changeset" or
1010"version", represents a step in the project's history, and each parent
1011represents an immediately preceding step. Commits with more than one
1012parent represent merges of independent lines of development.
1013
Junio C Hamanoe3f080d2013-04-22 02:27:131014All objects are named by the SHA-1 hash of their contents, normally
Junio C Hamano597ffcf2007-09-17 17:33:151015written as a string of 40 hex digits. Such names are globally unique.
1016The entire history leading up to a commit can be vouched for by signing
1017just that commit. A fourth object type, the tag, is provided for this
1018purpose.
1019
1020When first created, objects are stored in individual files, but for
1021efficiency may later be compressed together into "pack files".
1022
1023Named pointers called refs mark interesting points in history. A ref
Junio C Hamanoe3f080d2013-04-22 02:27:131024may contain the SHA-1 name of an object or the name of another ref. Refs
1025with names beginning `ref/head/` contain the SHA-1 name of the most
1026recent commit (or "head") of a branch under development. SHA-1 names of
Junio C Hamano597ffcf2007-09-17 17:33:151027tags of interest are stored under `ref/tags/`. A special ref named
1028`HEAD` contains the name of the currently checked-out branch.
1029
1030The index file is initialized with a list of all paths and, for each
1031path, a blob object and a set of attributes. The blob object represents
1032the contents of the file as of the head of the current branch. The
1033attributes (last modified time, size, etc.) are taken from the
1034corresponding file in the working tree. Subsequent changes to the
1035working tree can be found by comparing these attributes. The index may
1036be updated with new content, and new commits may be created from the
1037content stored in the index.
1038
1039The index is also capable of storing multiple entries (called "stages")
1040for a given pathname. These stages are used to hold the various
1041unmerged version of a file when a merge is in progress.
Junio C Hamano1a4e8412005-12-27 08:17:231042
Junio C Hamanod0316112012-08-22 19:55:291043FURTHER DOCUMENTATION
1044---------------------
1045
1046See the references in the "description" section to get started
Junio C Hamano076ffcc2013-02-06 05:13:211047using Git. The following is probably more detail than necessary
Junio C Hamanod0316112012-08-22 19:55:291048for a first-time user.
1049
Junio C Hamano076ffcc2013-02-06 05:13:211050The link:user-manual.html#git-concepts[Git concepts chapter of the
Junio C Hamanod0316112012-08-22 19:55:291051user-manual] and linkgit:gitcore-tutorial[7] both provide
Junio C Hamano076ffcc2013-02-06 05:13:211052introductions to the underlying Git architecture.
Junio C Hamanod0316112012-08-22 19:55:291053
1054See linkgit:gitworkflows[7] for an overview of recommended workflows.
1055
1056See also the link:howto-index.html[howto] documents for some useful
1057examples.
1058
1059The internals are documented in the
Junio C Hamano076ffcc2013-02-06 05:13:211060link:technical/api-index.html[Git API documentation].
Junio C Hamanod0316112012-08-22 19:55:291061
1062Users migrating from CVS may also want to
1063read linkgit:gitcvs-migration[7].
1064
1065
Junio C Hamano1a4e8412005-12-27 08:17:231066Authors
1067-------
Junio C Hamano5f3d8392011-03-15 23:33:351068Git was started by Linus Torvalds, and is currently maintained by Junio
Junio C Hamano076ffcc2013-02-06 05:13:211069C Hamano. Numerous contributions have come from the Git mailing list
Junio C Hamano0b0417b2012-12-13 20:35:021070<git@vger.kernel.org>. http://www.ohloh.net/p/git/contributors/summary
1071gives you a more complete list of contributors.
1072
1073If you have a clone of git.git itself, the
Junio C Hamano5f3d8392011-03-15 23:33:351074output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1075the authors for specific parts of the project.
Junio C Hamano1a4e8412005-12-27 08:17:231076
Junio C Hamanoa9788762010-08-03 15:15:541077Reporting Bugs
1078--------------
1079
1080Report bugs to the Git mailing list <git@vger.kernel.org> where the
1081development and maintenance is primarily done. You do not have to be
1082subscribed to the list to send a message there.
1083
Junio C Hamano9e1793f2008-06-02 07:31:161084SEE ALSO
1085--------
1086linkgit:gittutorial[7], linkgit:gittutorial-2[7],
Junio C Hamanoaf1987f2008-08-03 07:58:191087link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
Junio C Hamano9e1793f2008-06-02 07:31:161088linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
Junio C Hamano804b5212009-06-07 16:05:031089linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1090linkgit:gitworkflows[7]
Junio C Hamano9e1793f2008-06-02 07:31:161091
Junio C Hamano1a4e8412005-12-27 08:17:231092GIT
1093---
Junio C Hamanof7c042d2008-06-06 22:50:531094Part of the linkgit:git[1] suite