blob: 674ecf9a3ba9dded1fd9226133ccdc894f79ac23 [file] [log] [blame]
Christian Couder9e1f0a82008-06-06 09:07:32 +02001git(1)
David Greaves2cf565c2005-05-10 22:32:30 +01002======
David Greaves2cf565c2005-05-10 22:32:30 +01003
4NAME
5----
6git - the stupid content tracker
7
8
9SYNOPSIS
10--------
Jonas Fonseca8b700042006-08-25 03:05:48 +020011[verse]
Nazri Ramliy44e1e4d2013-09-09 21:47:43 +080012'git' [--version] [--help] [-C <path>] [-c <name>=<value>]
Zbigniew Jędrzejewski-Szmek68e4b552012-02-15 00:54:21 +010013 [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
Josh Triplettd49483f2011-07-08 16:14:10 -070014 [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
15 [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
Zbigniew Jędrzejewski-Szmek68e4b552012-02-15 00:54:21 +010016 <command> [<args>]
David Greaves2cf565c2005-05-10 22:32:30 +010017
18DESCRIPTION
19-----------
J. Bruce Fields23091e92006-04-02 17:54:34 -040020Git 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
Jonathan Nieder6998e4d2008-06-30 17:01:21 -050024See linkgit:gittutorial[7] to get started, then see
Junio C Hamano7687ae92012-08-17 12:48:52 -070025link: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.
David Greaves2cf565c2005-05-10 22:32:30 +010028
Junio C Hamano7687ae92012-08-17 12:48:52 -070029After you mastered the basic concepts, you can come back to this
Thomas Ackermann2de9b712013-01-21 20:17:53 +010030page to learn what commands Git offers. You can learn more about
31individual Git commands with "git help command". linkgit:gitcli[7]
Junio C Hamano7687ae92012-08-17 12:48:52 -070032manual page gives you an overview of the command line command syntax.
Petr Baudis4514ad42006-06-07 20:43:50 +020033
Thomas Ackermann2de9b712013-01-21 20:17:53 +010034Formatted and hyperlinked version of the latest Git documentation
Junio C Hamano7687ae92012-08-17 12:48:52 -070035can be viewed at `http://git-htmldocs.googlecode.com/git/git.html`.
Jari Aalto34b604a2007-04-30 14:21:38 +030036
Junio C Hamano26cfcfb2007-02-13 15:15:05 -080037ifdef::stalenotes[]
38[NOTE]
39============
Junio C Hamano26cfcfb2007-02-13 15:15:05 -080040
Junio C Hamano2ff3f612007-05-18 21:43:13 -070041You are reading the documentation for the latest (possibly
Thomas Ackermann2de9b712013-01-21 20:17:53 +010042unreleased) version of Git, that is available from 'master'
Junio C Hamano2ff3f612007-05-18 21:43:13 -070043branch of the `git.git` repository.
44Documentation for older releases are available here:
Junio C Hamano43a8e4f2007-03-28 15:40:17 -070045
Junio C Hamano9a8c2b62014-12-17 11:30:46 -080046* link:v2.0.5/git.html[documentation for release 2.0.5]
Junio C Hamanoe1564552014-05-28 11:04:19 -070047
48* release notes for
Junio C Hamano9a8c2b62014-12-17 11:30:46 -080049 link:RelNotes/2.0.5.txt[2.0.5],
Junio C Hamano32f56602014-07-30 14:19:53 -070050 link:RelNotes/2.0.4.txt[2.0.4],
Junio C Hamano740c2812014-07-23 11:33:16 -070051 link:RelNotes/2.0.3.txt[2.0.3],
Junio C Hamanoebc5da32014-07-16 11:19:56 -070052 link:RelNotes/2.0.2.txt[2.0.2],
Junio C Hamano341e7e82014-06-25 12:21:11 -070053 link:RelNotes/2.0.1.txt[2.0.1],
Junio C Hamanoe1564552014-05-28 11:04:19 -070054 link:RelNotes/2.0.0.txt[2.0.0].
55
Junio C Hamano83332632014-12-17 11:22:32 -080056* link:v1.9.5/git.html[documentation for release 1.9.5]
Junio C Hamano5f95c9f2014-02-14 11:35:04 -080057
58* release notes for
Junio C Hamano83332632014-12-17 11:22:32 -080059 link:RelNotes/1.9.5.txt[1.9.5],
Junio C Hamano34d52172014-05-28 15:50:22 -070060 link:RelNotes/1.9.4.txt[1.9.4],
Junio C Hamanoeea59132014-05-09 10:59:07 -070061 link:RelNotes/1.9.3.txt[1.9.3],
Junio C Hamano0bc85ab2014-04-09 12:04:34 -070062 link:RelNotes/1.9.2.txt[1.9.2],
Junio C Hamanocee0c272014-03-18 14:06:49 -070063 link:RelNotes/1.9.1.txt[1.9.1],
Junio C Hamano5f95c9f2014-02-14 11:35:04 -080064 link:RelNotes/1.9.0.txt[1.9.0].
65
Junio C Hamano5c8213a2014-12-17 11:18:45 -080066* link:v1.8.5.6/git.html[documentation for release 1.8.5.6]
Junio C Hamanod2446df2013-11-27 12:14:45 -080067
68* release notes for
Junio C Hamano5c8213a2014-12-17 11:18:45 -080069 link:RelNotes/1.8.5.6.txt[1.8.5.6],
Junio C Hamano7bbc4e82014-02-13 13:40:47 -080070 link:RelNotes/1.8.5.5.txt[1.8.5.5],
Junio C Hamano3330a2c2014-02-05 14:05:31 -080071 link:RelNotes/1.8.5.4.txt[1.8.5.4],
Junio C Hamano42249162014-01-13 11:28:26 -080072 link:RelNotes/1.8.5.3.txt[1.8.5.3],
Junio C Hamano5512ac52013-12-17 11:42:12 -080073 link:RelNotes/1.8.5.2.txt[1.8.5.2],
Junio C Hamanoa155a5f2013-12-03 11:16:56 -080074 link:RelNotes/1.8.5.1.txt[1.8.5.1],
Junio C Hamanod2446df2013-11-27 12:14:45 -080075 link:RelNotes/1.8.5.txt[1.8.5].
76
Junio C Hamano2f935412013-12-02 15:33:30 -080077* link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
Junio C Hamanoe230c562013-08-23 11:49:46 -070078
79* release notes for
Junio C Hamano2f935412013-12-02 15:33:30 -080080 link:RelNotes/1.8.4.5.txt[1.8.4.5],
Junio C Hamanobecb4332013-11-20 11:26:08 -080081 link:RelNotes/1.8.4.4.txt[1.8.4.4],
Junio C Hamanod7d2c872013-11-08 12:06:19 -080082 link:RelNotes/1.8.4.3.txt[1.8.4.3],
Junio C Hamanodcb11cc2013-10-28 10:21:29 -070083 link:RelNotes/1.8.4.2.txt[1.8.4.2],
Jonathan Nieder02a110a2013-09-26 15:01:41 -070084 link:RelNotes/1.8.4.1.txt[1.8.4.1],
Junio C Hamanoe230c562013-08-23 11:49:46 -070085 link:RelNotes/1.8.4.txt[1.8.4].
86
Junio C Hamano117eea72013-07-22 11:21:34 -070087* link:v1.8.3.4/git.html[documentation for release 1.8.3.4]
Junio C Hamano54219a42013-05-29 15:19:12 -070088
89* release notes for
Junio C Hamano117eea72013-07-22 11:21:34 -070090 link:RelNotes/1.8.3.4.txt[1.8.3.4],
Junio C Hamano5addd1c2013-07-15 10:39:43 -070091 link:RelNotes/1.8.3.3.txt[1.8.3.3],
Junio C Hamano3a461832013-06-28 14:56:30 -070092 link:RelNotes/1.8.3.2.txt[1.8.3.2],
Junio C Hamano362de912013-06-09 17:16:20 -070093 link:RelNotes/1.8.3.1.txt[1.8.3.1],
Junio C Hamano54219a42013-05-29 15:19:12 -070094 link:RelNotes/1.8.3.txt[1.8.3].
95
Junio C Hamano92758dd2013-05-09 12:37:53 -070096* link:v1.8.2.3/git.html[documentation for release 1.8.2.3]
Junio C Hamano239222f2013-03-13 11:28:08 -070097
98* release notes for
Junio C Hamano54219a42013-05-29 15:19:12 -070099 link:RelNotes/1.8.2.3.txt[1.8.2.3],
100 link:RelNotes/1.8.2.2.txt[1.8.2.2],
101 link:RelNotes/1.8.2.1.txt[1.8.2.1],
Junio C Hamano239222f2013-03-13 11:28:08 -0700102 link:RelNotes/1.8.2.txt[1.8.2].
103
Junio C Hamano2137ce02013-04-07 08:58:30 -0700104* link:v1.8.1.6/git.html[documentation for release 1.8.1.6]
Junio C Hamano5d417842012-12-31 14:24:22 -0800105
106* release notes for
Junio C Hamano2137ce02013-04-07 08:58:30 -0700107 link:RelNotes/1.8.1.6.txt[1.8.1.6],
Junio C Hamanoe6363a42013-03-01 13:15:29 -0800108 link:RelNotes/1.8.1.5.txt[1.8.1.5],
Junio C Hamanodff9f882013-02-19 05:48:05 +0000109 link:RelNotes/1.8.1.4.txt[1.8.1.4],
Junio C Hamanof3500822013-02-07 15:21:10 -0800110 link:RelNotes/1.8.1.3.txt[1.8.1.3],
111 link:RelNotes/1.8.1.2.txt[1.8.1.2],
Junio C Hamanoe4f59a32013-01-14 08:04:50 -0800112 link:RelNotes/1.8.1.1.txt[1.8.1.1],
Junio C Hamano5d417842012-12-31 14:24:22 -0800113 link:RelNotes/1.8.1.txt[1.8.1].
114
Junio C Hamano15999992012-12-27 15:57:20 -0800115* link:v1.8.0.3/git.html[documentation for release 1.8.0.3]
Junio C Hamano8c7a7862012-10-21 13:56:23 -0700116
117* release notes for
Junio C Hamano15999992012-12-27 15:57:20 -0800118 link:RelNotes/1.8.0.3.txt[1.8.0.3],
Junio C Hamano3e538912012-12-10 13:05:47 -0800119 link:RelNotes/1.8.0.2.txt[1.8.0.2],
Junio C Hamanoed9fe752012-11-25 18:40:34 -0800120 link:RelNotes/1.8.0.1.txt[1.8.0.1],
121 link:RelNotes/1.8.0.txt[1.8.0].
Junio C Hamano8c7a7862012-10-21 13:56:23 -0700122
Junio C Hamano7e201052012-10-17 10:36:01 -0700123* link:v1.7.12.4/git.html[documentation for release 1.7.12.4]
Junio C Hamano889d3582012-08-19 17:02:11 -0700124
125* release notes for
Junio C Hamano7e201052012-10-17 10:36:01 -0700126 link:RelNotes/1.7.12.4.txt[1.7.12.4],
Junio C Hamano234cd452012-10-08 11:40:43 -0700127 link:RelNotes/1.7.12.3.txt[1.7.12.3],
Junio C Hamanod8cf0532012-09-29 22:33:25 -0700128 link:RelNotes/1.7.12.2.txt[1.7.12.2],
Junio C Hamano304b7d92012-09-18 14:34:31 -0700129 link:RelNotes/1.7.12.1.txt[1.7.12.1],
Junio C Hamano889d3582012-08-19 17:02:11 -0700130 link:RelNotes/1.7.12.txt[1.7.12].
131
Junio C Hamanobafc4782012-09-14 20:57:23 -0700132* link:v1.7.11.7/git.html[documentation for release 1.7.11.7]
Junio C Hamano0ce2e392012-06-17 14:07:15 -0700133
134* release notes for
Junio C Hamanobafc4782012-09-14 20:57:23 -0700135 link:RelNotes/1.7.11.7.txt[1.7.11.7],
Junio C Hamanoe09e4022012-09-11 11:18:48 -0700136 link:RelNotes/1.7.11.6.txt[1.7.11.6],
Junio C Hamanocd7c0be2012-08-15 13:39:53 -0700137 link:RelNotes/1.7.11.5.txt[1.7.11.5],
Junio C Hamano0e4c8822012-07-30 13:09:25 -0700138 link:RelNotes/1.7.11.4.txt[1.7.11.4],
Junio C Hamanoe6dfbcf2012-07-22 13:07:40 -0700139 link:RelNotes/1.7.11.3.txt[1.7.11.3],
Junio C Hamano8d141a12012-07-11 12:55:38 -0700140 link:RelNotes/1.7.11.2.txt[1.7.11.2],
Junio C Hamano0e64a952012-06-21 13:16:46 -0700141 link:RelNotes/1.7.11.1.txt[1.7.11.1],
Junio C Hamano0ce2e392012-06-17 14:07:15 -0700142 link:RelNotes/1.7.11.txt[1.7.11].
143
Junio C Hamano785ee492012-06-17 14:04:15 -0700144* link:v1.7.10.5/git.html[documentation for release 1.7.10.5]
Junio C Hamanoe8dde3e2012-04-06 10:47:58 -0700145
146* release notes for
Junio C Hamano785ee492012-06-17 14:04:15 -0700147 link:RelNotes/1.7.10.5.txt[1.7.10.5],
Junio C Hamano121f71f2012-06-03 15:53:58 -0700148 link:RelNotes/1.7.10.4.txt[1.7.10.4],
Junio C Hamano6a6d72b2012-06-01 13:05:27 -0700149 link:RelNotes/1.7.10.3.txt[1.7.10.3],
Junio C Hamanob6555d72012-05-11 11:25:28 -0700150 link:RelNotes/1.7.10.2.txt[1.7.10.2],
Junio C Hamanobf505152012-05-01 21:18:44 -0700151 link:RelNotes/1.7.10.1.txt[1.7.10.1],
Junio C Hamanoe8dde3e2012-04-06 10:47:58 -0700152 link:RelNotes/1.7.10.txt[1.7.10].
153
Junio C Hamanod0f1ea62012-04-26 10:23:15 -0700154* link:v1.7.9.7/git.html[documentation for release 1.7.9.7]
Junio C Hamano828ea972012-01-27 11:31:02 -0800155
156* release notes for
Junio C Hamanod0f1ea62012-04-26 10:23:15 -0700157 link:RelNotes/1.7.9.7.txt[1.7.9.7],
Junio C Hamanocb2ed322012-04-02 13:07:58 -0700158 link:RelNotes/1.7.9.6.txt[1.7.9.6],
Junio C Hamano8ced9c92012-03-26 12:23:34 -0700159 link:RelNotes/1.7.9.5.txt[1.7.9.5],
Junio C Hamanoa4603482012-03-12 15:52:52 -0700160 link:RelNotes/1.7.9.4.txt[1.7.9.4],
Junio C Hamano69f4e082012-03-05 14:29:07 -0800161 link:RelNotes/1.7.9.3.txt[1.7.9.3],
Junio C Hamano78f4c9f2012-02-22 17:48:01 -0800162 link:RelNotes/1.7.9.2.txt[1.7.9.2],
Junio C Hamano90020e32012-02-14 09:53:38 -0800163 link:RelNotes/1.7.9.1.txt[1.7.9.1],
Junio C Hamano828ea972012-01-27 11:31:02 -0800164 link:RelNotes/1.7.9.txt[1.7.9].
165
Junio C Hamanod9f5ef72012-04-26 09:59:22 -0700166* link:v1.7.8.6/git.html[documentation for release 1.7.8.6]
Junio C Hamano406da782011-12-02 09:31:32 -0800167
168* release notes for
Junio C Hamanod9f5ef72012-04-26 09:59:22 -0700169 link:RelNotes/1.7.8.6.txt[1.7.8.6],
Junio C Hamanocb2ed322012-04-02 13:07:58 -0700170 link:RelNotes/1.7.8.5.txt[1.7.8.5],
Junio C Hamanoc572f492012-01-18 15:51:00 -0800171 link:RelNotes/1.7.8.4.txt[1.7.8.4],
Junio C Hamano5f4d1332012-01-06 12:41:39 -0800172 link:RelNotes/1.7.8.3.txt[1.7.8.3],
173 link:RelNotes/1.7.8.2.txt[1.7.8.2],
174 link:RelNotes/1.7.8.1.txt[1.7.8.1],
Junio C Hamano406da782011-12-02 09:31:32 -0800175 link:RelNotes/1.7.8.txt[1.7.8].
176
Junio C Hamano82588582012-04-26 09:41:52 -0700177* link:v1.7.7.7/git.html[documentation for release 1.7.7.7]
Junio C Hamano703f05a2011-09-30 14:20:57 -0700178
179* release notes for
Junio C Hamano82588582012-04-26 09:41:52 -0700180 link:RelNotes/1.7.7.7.txt[1.7.7.7],
Junio C Hamanoc572f492012-01-18 15:51:00 -0800181 link:RelNotes/1.7.7.6.txt[1.7.7.6],
Junio C Hamano66c11f02011-12-13 21:55:31 -0800182 link:RelNotes/1.7.7.5.txt[1.7.7.5],
183 link:RelNotes/1.7.7.4.txt[1.7.7.4],
184 link:RelNotes/1.7.7.3.txt[1.7.7.3],
185 link:RelNotes/1.7.7.2.txt[1.7.7.2],
Junio C Hamanof7d958d2011-10-23 21:48:06 -0700186 link:RelNotes/1.7.7.1.txt[1.7.7.1],
Junio C Hamano703f05a2011-09-30 14:20:57 -0700187 link:RelNotes/1.7.7.txt[1.7.7].
188
Junio C Hamanof174a252012-02-05 23:46:44 -0800189* link:v1.7.6.6/git.html[documentation for release 1.7.6.6]
Junio C Hamanof6965432011-06-26 12:41:16 -0700190
191* release notes for
Junio C Hamanof174a252012-02-05 23:46:44 -0800192 link:RelNotes/1.7.6.6.txt[1.7.6.6],
Junio C Hamano15b78982011-12-13 21:30:40 -0800193 link:RelNotes/1.7.6.5.txt[1.7.6.5],
Junio C Hamano63205262011-09-23 14:38:39 -0700194 link:RelNotes/1.7.6.4.txt[1.7.6.4],
Junio C Hamano740a8fc2011-09-12 10:33:03 -0700195 link:RelNotes/1.7.6.3.txt[1.7.6.3],
Junio C Hamano509d5972011-09-06 11:41:02 -0700196 link:RelNotes/1.7.6.2.txt[1.7.6.2],
197 link:RelNotes/1.7.6.1.txt[1.7.6.1],
Junio C Hamanof6965432011-06-26 12:41:16 -0700198 link:RelNotes/1.7.6.txt[1.7.6].
199
Junio C Hamanoe5af0de2011-06-01 14:08:26 -0700200* link:v1.7.5.4/git.html[documentation for release 1.7.5.4]
Junio C Hamanoec014ea2011-04-23 23:36:32 -0700201
202* release notes for
Junio C Hamanoe5af0de2011-06-01 14:08:26 -0700203 link:RelNotes/1.7.5.4.txt[1.7.5.4],
Junio C Hamano3c3e0b32011-05-26 09:45:29 -0700204 link:RelNotes/1.7.5.3.txt[1.7.5.3],
Junio C Hamano3d5ae432011-05-19 20:30:44 -0700205 link:RelNotes/1.7.5.2.txt[1.7.5.2],
Junio C Hamano2f312e82011-05-04 15:47:40 -0700206 link:RelNotes/1.7.5.1.txt[1.7.5.1],
Junio C Hamanoec014ea2011-04-23 23:36:32 -0700207 link:RelNotes/1.7.5.txt[1.7.5].
208
Junio C Hamano6ceb2702011-04-19 11:51:00 -0700209* link:v1.7.4.5/git.html[documentation for release 1.7.4.5]
Junio C Hamano7ed863a2011-01-30 11:53:13 -0800210
211* release notes for
Junio C Hamano6ceb2702011-04-19 11:51:00 -0700212 link:RelNotes/1.7.4.5.txt[1.7.4.5],
Junio C Hamano6be05592011-04-06 10:57:32 -0700213 link:RelNotes/1.7.4.4.txt[1.7.4.4],
Junio C Hamanocb35c062011-04-03 00:18:50 -0700214 link:RelNotes/1.7.4.3.txt[1.7.4.3],
215 link:RelNotes/1.7.4.2.txt[1.7.4.2],
Junio C Hamano9971d6d2011-02-11 14:39:55 -0800216 link:RelNotes/1.7.4.1.txt[1.7.4.1],
Junio C Hamano7ed863a2011-01-30 11:53:13 -0800217 link:RelNotes/1.7.4.txt[1.7.4].
218
Junio C Hamano685e9d92011-01-05 14:46:07 -0800219* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
Junio C Hamano87b50542010-09-18 14:55:08 -0700220
221* release notes for
Junio C Hamano685e9d92011-01-05 14:46:07 -0800222 link:RelNotes/1.7.3.5.txt[1.7.3.5],
Junio C Hamano15368e12010-12-15 15:30:49 -0800223 link:RelNotes/1.7.3.4.txt[1.7.3.4],
Junio C Hamanoed94cc72010-12-09 15:52:12 -0800224 link:RelNotes/1.7.3.3.txt[1.7.3.3],
Junio C Hamano8a904382010-10-21 17:14:32 -0700225 link:RelNotes/1.7.3.2.txt[1.7.3.2],
Junio C Hamano92c1e712010-09-29 09:42:53 -0700226 link:RelNotes/1.7.3.1.txt[1.7.3.1],
Junio C Hamano87b50542010-09-18 14:55:08 -0700227 link:RelNotes/1.7.3.txt[1.7.3].
228
Junio C Hamano1b974342010-12-16 21:43:08 -0800229* link:v1.7.2.5/git.html[documentation for release 1.7.2.5]
Junio C Hamano64fdc082010-07-21 12:55:50 -0700230
231* release notes for
Junio C Hamano1b974342010-12-16 21:43:08 -0800232 link:RelNotes/1.7.2.5.txt[1.7.2.5],
Junio C Hamanoed94cc72010-12-09 15:52:12 -0800233 link:RelNotes/1.7.2.4.txt[1.7.2.4],
Nicolas Pitre761e7422010-09-06 20:29:57 -0400234 link:RelNotes/1.7.2.3.txt[1.7.2.3],
235 link:RelNotes/1.7.2.2.txt[1.7.2.2],
236 link:RelNotes/1.7.2.1.txt[1.7.2.1],
237 link:RelNotes/1.7.2.txt[1.7.2].
Junio C Hamano64fdc082010-07-21 12:55:50 -0700238
Junio C Hamano1b974342010-12-16 21:43:08 -0800239* link:v1.7.1.4/git.html[documentation for release 1.7.1.4]
Junio C Hamanod599e042010-04-23 18:27:17 -0700240
241* release notes for
Junio C Hamano1b974342010-12-16 21:43:08 -0800242 link:RelNotes/1.7.1.4.txt[1.7.1.4],
Junio C Hamanoed94cc72010-12-09 15:52:12 -0800243 link:RelNotes/1.7.1.3.txt[1.7.1.3],
Nicolas Pitre761e7422010-09-06 20:29:57 -0400244 link:RelNotes/1.7.1.2.txt[1.7.1.2],
245 link:RelNotes/1.7.1.1.txt[1.7.1.1],
246 link:RelNotes/1.7.1.txt[1.7.1].
Junio C Hamanod599e042010-04-23 18:27:17 -0700247
Junio C Hamano1b974342010-12-16 21:43:08 -0800248* link:v1.7.0.9/git.html[documentation for release 1.7.0.9]
Junio C Hamanoe923eae2010-02-12 15:45:05 -0800249
250* release notes for
Junio C Hamano1b974342010-12-16 21:43:08 -0800251 link:RelNotes/1.7.0.9.txt[1.7.0.9],
Junio C Hamanoed94cc72010-12-09 15:52:12 -0800252 link:RelNotes/1.7.0.8.txt[1.7.0.8],
Nicolas Pitre761e7422010-09-06 20:29:57 -0400253 link:RelNotes/1.7.0.7.txt[1.7.0.7],
254 link:RelNotes/1.7.0.6.txt[1.7.0.6],
255 link:RelNotes/1.7.0.5.txt[1.7.0.5],
256 link:RelNotes/1.7.0.4.txt[1.7.0.4],
257 link:RelNotes/1.7.0.3.txt[1.7.0.3],
258 link:RelNotes/1.7.0.2.txt[1.7.0.2],
259 link:RelNotes/1.7.0.1.txt[1.7.0.1],
260 link:RelNotes/1.7.0.txt[1.7.0].
Junio C Hamanoe923eae2010-02-12 15:45:05 -0800261
Junio C Hamano1b974342010-12-16 21:43:08 -0800262* link:v1.6.6.3/git.html[documentation for release 1.6.6.3]
Junio C Hamano902f2352009-12-23 11:58:52 -0800263
264* release notes for
Junio C Hamano1b974342010-12-16 21:43:08 -0800265 link:RelNotes/1.6.6.3.txt[1.6.6.3],
Nicolas Pitre761e7422010-09-06 20:29:57 -0400266 link:RelNotes/1.6.6.2.txt[1.6.6.2],
267 link:RelNotes/1.6.6.1.txt[1.6.6.1],
268 link:RelNotes/1.6.6.txt[1.6.6].
Junio C Hamano902f2352009-12-23 11:58:52 -0800269
Junio C Hamano1b974342010-12-16 21:43:08 -0800270* link:v1.6.5.9/git.html[documentation for release 1.6.5.9]
Junio C Hamano78d553b2009-10-10 00:05:19 -0700271
272* release notes for
Junio C Hamano1b974342010-12-16 21:43:08 -0800273 link:RelNotes/1.6.5.9.txt[1.6.5.9],
Nicolas Pitre761e7422010-09-06 20:29:57 -0400274 link:RelNotes/1.6.5.8.txt[1.6.5.8],
275 link:RelNotes/1.6.5.7.txt[1.6.5.7],
276 link:RelNotes/1.6.5.6.txt[1.6.5.6],
277 link:RelNotes/1.6.5.5.txt[1.6.5.5],
278 link:RelNotes/1.6.5.4.txt[1.6.5.4],
279 link:RelNotes/1.6.5.3.txt[1.6.5.3],
280 link:RelNotes/1.6.5.2.txt[1.6.5.2],
281 link:RelNotes/1.6.5.1.txt[1.6.5.1],
282 link:RelNotes/1.6.5.txt[1.6.5].
Junio C Hamano78d553b2009-10-10 00:05:19 -0700283
Junio C Hamano1b974342010-12-16 21:43:08 -0800284* link:v1.6.4.5/git.html[documentation for release 1.6.4.5]
Junio C Hamano0a53e9d2009-07-29 00:32:42 -0700285
286* release notes for
Junio C Hamano1b974342010-12-16 21:43:08 -0800287 link:RelNotes/1.6.4.5.txt[1.6.4.5],
Nicolas Pitre761e7422010-09-06 20:29:57 -0400288 link:RelNotes/1.6.4.4.txt[1.6.4.4],
289 link:RelNotes/1.6.4.3.txt[1.6.4.3],
290 link:RelNotes/1.6.4.2.txt[1.6.4.2],
291 link:RelNotes/1.6.4.1.txt[1.6.4.1],
292 link:RelNotes/1.6.4.txt[1.6.4].
Junio C Hamano0a53e9d2009-07-29 00:32:42 -0700293
Junio C Hamano441b40d2009-07-29 00:00:56 -0700294* link:v1.6.3.4/git.html[documentation for release 1.6.3.4]
Junio C Hamano6096d752009-06-03 22:52:37 -0700295
296* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400297 link:RelNotes/1.6.3.4.txt[1.6.3.4],
298 link:RelNotes/1.6.3.3.txt[1.6.3.3],
299 link:RelNotes/1.6.3.2.txt[1.6.3.2],
300 link:RelNotes/1.6.3.1.txt[1.6.3.1],
301 link:RelNotes/1.6.3.txt[1.6.3].
Junio C Hamanoa95148d2009-03-03 23:02:16 -0800302
303* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400304 link:RelNotes/1.6.2.5.txt[1.6.2.5],
305 link:RelNotes/1.6.2.4.txt[1.6.2.4],
306 link:RelNotes/1.6.2.3.txt[1.6.2.3],
307 link:RelNotes/1.6.2.2.txt[1.6.2.2],
308 link:RelNotes/1.6.2.1.txt[1.6.2.1],
309 link:RelNotes/1.6.2.txt[1.6.2].
Junio C Hamanoa95148d2009-03-03 23:02:16 -0800310
Junio C Hamano621f1b42009-02-07 11:06:34 -0800311* link:v1.6.1.3/git.html[documentation for release 1.6.1.3]
Junio C Hamano8104ebf2008-12-24 19:41:08 -0800312
313* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400314 link:RelNotes/1.6.1.3.txt[1.6.1.3],
315 link:RelNotes/1.6.1.2.txt[1.6.1.2],
316 link:RelNotes/1.6.1.1.txt[1.6.1.1],
317 link:RelNotes/1.6.1.txt[1.6.1].
Junio C Hamano8104ebf2008-12-24 19:41:08 -0800318
Junio C Hamanoefe05b02008-12-19 19:32:29 -0800319* link:v1.6.0.6/git.html[documentation for release 1.6.0.6]
Junio C Hamanoea02eef2008-08-17 11:42:10 -0700320
321* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400322 link:RelNotes/1.6.0.6.txt[1.6.0.6],
323 link:RelNotes/1.6.0.5.txt[1.6.0.5],
324 link:RelNotes/1.6.0.4.txt[1.6.0.4],
325 link:RelNotes/1.6.0.3.txt[1.6.0.3],
326 link:RelNotes/1.6.0.2.txt[1.6.0.2],
327 link:RelNotes/1.6.0.1.txt[1.6.0.1],
328 link:RelNotes/1.6.0.txt[1.6.0].
Junio C Hamanoea02eef2008-08-17 11:42:10 -0700329
Junio C Hamanoefe05b02008-12-19 19:32:29 -0800330* link:v1.5.6.6/git.html[documentation for release 1.5.6.6]
Junio C Hamanoe449f102008-06-18 13:09:43 -0700331
332* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400333 link:RelNotes/1.5.6.6.txt[1.5.6.6],
334 link:RelNotes/1.5.6.5.txt[1.5.6.5],
335 link:RelNotes/1.5.6.4.txt[1.5.6.4],
336 link:RelNotes/1.5.6.3.txt[1.5.6.3],
337 link:RelNotes/1.5.6.2.txt[1.5.6.2],
338 link:RelNotes/1.5.6.1.txt[1.5.6.1],
339 link:RelNotes/1.5.6.txt[1.5.6].
Junio C Hamanoe449f102008-06-18 13:09:43 -0700340
Junio C Hamanoefe05b02008-12-19 19:32:29 -0800341* link:v1.5.5.6/git.html[documentation for release 1.5.5.6]
Junio C Hamano1d2375d2008-04-07 21:57:43 -0700342
343* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400344 link:RelNotes/1.5.5.6.txt[1.5.5.6],
345 link:RelNotes/1.5.5.5.txt[1.5.5.5],
346 link:RelNotes/1.5.5.4.txt[1.5.5.4],
347 link:RelNotes/1.5.5.3.txt[1.5.5.3],
348 link:RelNotes/1.5.5.2.txt[1.5.5.2],
349 link:RelNotes/1.5.5.1.txt[1.5.5.1],
350 link:RelNotes/1.5.5.txt[1.5.5].
Junio C Hamano1d2375d2008-04-07 21:57:43 -0700351
Junio C Hamanoefe05b02008-12-19 19:32:29 -0800352* link:v1.5.4.7/git.html[documentation for release 1.5.4.7]
Junio C Hamano6ce8e442008-02-01 20:40:30 -0800353
354* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400355 link:RelNotes/1.5.4.7.txt[1.5.4.7],
356 link:RelNotes/1.5.4.6.txt[1.5.4.6],
357 link:RelNotes/1.5.4.5.txt[1.5.4.5],
358 link:RelNotes/1.5.4.4.txt[1.5.4.4],
359 link:RelNotes/1.5.4.3.txt[1.5.4.3],
360 link:RelNotes/1.5.4.2.txt[1.5.4.2],
361 link:RelNotes/1.5.4.1.txt[1.5.4.1],
362 link:RelNotes/1.5.4.txt[1.5.4].
Junio C Hamano6ce8e442008-02-01 20:40:30 -0800363
Junio C Hamanoe708af62008-01-07 23:39:02 -0800364* link:v1.5.3.8/git.html[documentation for release 1.5.3.8]
Junio C Hamano5587cac2007-09-02 15:16:44 -0700365
366* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400367 link:RelNotes/1.5.3.8.txt[1.5.3.8],
368 link:RelNotes/1.5.3.7.txt[1.5.3.7],
369 link:RelNotes/1.5.3.6.txt[1.5.3.6],
370 link:RelNotes/1.5.3.5.txt[1.5.3.5],
371 link:RelNotes/1.5.3.4.txt[1.5.3.4],
372 link:RelNotes/1.5.3.3.txt[1.5.3.3],
373 link:RelNotes/1.5.3.2.txt[1.5.3.2],
374 link:RelNotes/1.5.3.1.txt[1.5.3.1],
375 link:RelNotes/1.5.3.txt[1.5.3].
Junio C Hamanob6e4db62007-05-18 17:28:24 -0700376
Junio C Hamanoe6361062008-06-25 17:09:40 -0700377* link:v1.5.2.5/git.html[documentation for release 1.5.2.5]
378
Junio C Hamanoaba170c2007-05-20 00:30:39 -0700379* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400380 link:RelNotes/1.5.2.5.txt[1.5.2.5],
381 link:RelNotes/1.5.2.4.txt[1.5.2.4],
382 link:RelNotes/1.5.2.3.txt[1.5.2.3],
383 link:RelNotes/1.5.2.2.txt[1.5.2.2],
384 link:RelNotes/1.5.2.1.txt[1.5.2.1],
385 link:RelNotes/1.5.2.txt[1.5.2].
Junio C Hamanoaba170c2007-05-20 00:30:39 -0700386
387* link:v1.5.1.6/git.html[documentation for release 1.5.1.6]
388
389* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400390 link:RelNotes/1.5.1.6.txt[1.5.1.6],
391 link:RelNotes/1.5.1.5.txt[1.5.1.5],
392 link:RelNotes/1.5.1.4.txt[1.5.1.4],
393 link:RelNotes/1.5.1.3.txt[1.5.1.3],
394 link:RelNotes/1.5.1.2.txt[1.5.1.2],
395 link:RelNotes/1.5.1.1.txt[1.5.1.1],
396 link:RelNotes/1.5.1.txt[1.5.1].
Junio C Hamano467592e2007-05-08 23:47:35 -0700397
Junio C Hamano2ff3f612007-05-18 21:43:13 -0700398* link:v1.5.0.7/git.html[documentation for release 1.5.0.7]
Junio C Hamano467592e2007-05-08 23:47:35 -0700399
Junio C Hamanoaba170c2007-05-20 00:30:39 -0700400* release notes for
Nicolas Pitre761e7422010-09-06 20:29:57 -0400401 link:RelNotes/1.5.0.7.txt[1.5.0.7],
402 link:RelNotes/1.5.0.6.txt[1.5.0.6],
403 link:RelNotes/1.5.0.5.txt[1.5.0.5],
404 link:RelNotes/1.5.0.3.txt[1.5.0.3],
405 link:RelNotes/1.5.0.2.txt[1.5.0.2],
406 link:RelNotes/1.5.0.1.txt[1.5.0.1],
407 link:RelNotes/1.5.0.txt[1.5.0].
Junio C Hamanofdd3e7d2007-04-21 23:51:27 -0700408
Junio C Hamano2ff3f612007-05-18 21:43:13 -0700409* documentation for release link:v1.4.4.4/git.html[1.4.4.4],
410 link:v1.3.3/git.html[1.3.3],
411 link:v1.2.6/git.html[1.2.6],
412 link:v1.0.13/git.html[1.0.13].
Junio C Hamano26cfcfb2007-02-13 15:15:05 -0800413
414============
415
416endif::stalenotes[]
417
Andreas Ericssoncb22bc42005-11-16 00:31:25 +0100418OPTIONS
419-------
420--version::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100421 Prints the Git suite version that the 'git' program came from.
David Greaves2cf565c2005-05-10 22:32:30 +0100422
Andreas Ericssoncb22bc42005-11-16 00:31:25 +0100423--help::
Fredrik Kuivinena87cd022006-03-09 17:24:19 +0100424 Prints the synopsis and a list of the most commonly used
Christian Couder0f6f1952007-12-04 06:44:29 +0100425 commands. If the option '--all' or '-a' is given then all
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100426 available commands are printed. If a Git command is named this
Christian Couder0f6f1952007-12-04 06:44:29 +0100427 option will bring up the manual page for that command.
Christian Couder45533d22007-12-04 06:44:29 +0100428+
429Other options are available to control how the manual page is
Dan McGee5162e692007-12-29 00:20:38 -0600430displayed. See linkgit:git-help[1] for more information,
Jonathan Niederdb5d6662008-07-03 01:06:23 -0500431because `git --help ...` is converted internally into `git
432help ...`.
Andreas Ericssoncb22bc42005-11-16 00:31:25 +0100433
Nazri Ramliy44e1e4d2013-09-09 21:47:43 +0800434-C <path>::
435 Run as if git was started in '<path>' instead of the current working
436 directory. When multiple `-C` options are given, each subsequent
437 non-absolute `-C <path>` is interpreted relative to the preceding `-C
438 <path>`.
439+
440This option affects options that expect path name like `--git-dir` and
441`--work-tree` in that their interpretations of the path names would be
442made relative to the working directory caused by the `-C` option. For
443example the following invocations are equivalent:
444
445 git --git-dir=a.git --work-tree=b -C c status
446 git --git-dir=c/a.git --work-tree=c/b status
447
Alex Riesen8b1fa772010-03-26 23:53:57 +0100448-c <name>=<value>::
449 Pass a configuration parameter to the command. The value
450 given will override values from configuration files.
451 The <name> is expected in the same format as listed by
452 'git config' (subkeys separated by dots).
453
Štěpán Němec62b46982010-10-08 19:31:15 +0200454--exec-path[=<path>]::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100455 Path to wherever your core Git programs are installed.
Andreas Ericssoncb22bc42005-11-16 00:31:25 +0100456 This can also be controlled by setting the GIT_EXEC_PATH
Jonathan Nieder56992f72008-07-03 00:08:12 -0500457 environment variable. If no path is given, 'git' will print
Andreas Ericssoncb22bc42005-11-16 00:31:25 +0100458 the current setting and then exit.
459
Markus Heidelberg89a56bf2009-04-05 04:15:16 +0200460--html-path::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100461 Print the path, without trailing slash, where Git's HTML
Jonathan Nieder239b5ed2011-05-02 01:07:45 -0500462 documentation is installed and exit.
Markus Heidelberg89a56bf2009-04-05 04:15:16 +0200463
Jon Seymourf2dd8c32011-05-01 18:16:25 +1000464--man-path::
Jonathan Nieder239b5ed2011-05-02 01:07:45 -0500465 Print the manpath (see `man(1)`) for the man pages for
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100466 this version of Git and exit.
Jon Seymourf2dd8c32011-05-01 18:16:25 +1000467
468--info-path::
Jonathan Nieder239b5ed2011-05-02 01:07:45 -0500469 Print the path where the Info files documenting this
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100470 version of Git are installed and exit.
Johannes Schindelin6acbcb92006-07-25 20:24:22 +0200471
Matthieu Moy463a8492007-08-19 19:24:36 +0200472-p::
473--paginate::
Jonathan Nieder06300d92010-02-14 06:02:35 -0600474 Pipe all output into 'less' (or if set, $PAGER) if standard
475 output is a terminal. This overrides the `pager.<cmd>`
476 configuration options (see the "Configuration Mechanism" section
477 below).
Johannes Schindelin6acbcb92006-07-25 20:24:22 +0200478
Matthieu Moy463a8492007-08-19 19:24:36 +0200479--no-pager::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100480 Do not pipe Git output into a pager.
Matthieu Moy463a8492007-08-19 19:24:36 +0200481
Johannes Schindelin6acbcb92006-07-25 20:24:22 +0200482--git-dir=<path>::
483 Set the path to the repository. This can also be controlled by
Liu Yubao302cc112008-04-29 04:09:20 +0800484 setting the GIT_DIR environment variable. It can be an absolute
485 path or relative path to current working directory.
Johannes Schindelin6acbcb92006-07-25 20:24:22 +0200486
Matthias Lederhofer892c41b2007-06-06 09:10:42 +0200487--work-tree=<path>::
Junio C Hamanoea472c12011-01-23 15:49:41 -0800488 Set the path to the working tree. It can be an absolute path
489 or a path relative to the current working directory.
Matthias Lederhofer892c41b2007-06-06 09:10:42 +0200490 This can also be controlled by setting the GIT_WORK_TREE
491 environment variable and the core.worktree configuration
Junio C Hamanoea472c12011-01-23 15:49:41 -0800492 variable (see core.worktree in linkgit:git-config[1] for a
493 more detailed discussion).
Matthias Lederhofer892c41b2007-06-06 09:10:42 +0200494
Josh Triplettd49483f2011-07-08 16:14:10 -0700495--namespace=<path>::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100496 Set the Git namespace. See linkgit:gitnamespaces[7] for more
Josh Triplettd49483f2011-07-08 16:14:10 -0700497 details. Equivalent to setting the `GIT_NAMESPACE` environment
498 variable.
499
Johannes Schindelin6acbcb92006-07-25 20:24:22 +0200500--bare::
Junio C Hamano9277d602007-08-27 22:41:23 -0700501 Treat the repository as a bare repository. If GIT_DIR
502 environment is not set, it is set to the current working
503 directory.
504
Christian Couderb0fa7ab2009-10-12 22:30:32 +0200505--no-replace-objects::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100506 Do not use replacement refs to replace Git objects. See
Christian Couderb0fa7ab2009-10-12 22:30:32 +0200507 linkgit:git-replace[1] for more information.
508
Jeff King823ab402012-12-19 17:37:30 -0500509--literal-pathspecs::
Nguyễn Thái Ngọc Duya16bf9d2013-07-14 15:36:07 +0700510 Treat pathspecs literally (i.e. no globbing, no pathspec magic).
511 This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment
Jeff King823ab402012-12-19 17:37:30 -0500512 variable to `1`.
513
Steffen Prohaska6fb02162013-09-23 20:54:35 +0200514--glob-pathspecs::
Nguyễn Thái Ngọc Duybd30c2e2013-07-14 15:36:08 +0700515 Add "glob" magic to all pathspec. This is equivalent to setting
516 the `GIT_GLOB_PATHSPECS` environment variable to `1`. Disabling
517 globbing on individual pathspecs can be done using pathspec
518 magic ":(literal)"
519
Steffen Prohaska6fb02162013-09-23 20:54:35 +0200520--noglob-pathspecs::
Nguyễn Thái Ngọc Duybd30c2e2013-07-14 15:36:08 +0700521 Add "literal" magic to all pathspec. This is equivalent to setting
522 the `GIT_NOGLOB_PATHSPECS` environment variable to `1`. Enabling
523 globbing on individual pathspecs can be done using pathspec
524 magic ":(glob)"
Junio C Hamano0d6a8732005-08-23 21:18:49 -0700525
Steffen Prohaska6fb02162013-09-23 20:54:35 +0200526--icase-pathspecs::
Nguyễn Thái Ngọc Duy93d93532013-07-14 15:36:09 +0700527 Add "icase" magic to all pathspec. This is equivalent to setting
528 the `GIT_ICASE_PATHSPECS` environment variable to `1`.
David Greaves6c84e2e2005-05-22 18:44:16 +0100529
J. Bruce Fields23091e92006-04-02 17:54:34 -0400530GIT COMMANDS
531------------
Junio C Hamano8db93072005-08-30 13:51:01 -0700532
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100533We divide Git into high level ("porcelain") commands and low level
J. Bruce Fields23091e92006-04-02 17:54:34 -0400534("plumbing") commands.
Junio C Hamanoe6fc2342005-08-25 00:28:18 -0700535
J. Bruce Fields23091e92006-04-02 17:54:34 -0400536High-level commands (porcelain)
537-------------------------------
538
539We separate the porcelain commands into the main commands and some
540ancillary user utilities.
541
542Main porcelain commands
543~~~~~~~~~~~~~~~~~~~~~~~
Junio C Hamano905197d2005-08-26 21:33:46 -0700544
Junio C Hamano377e8132007-01-18 15:03:13 -0800545include::cmds-mainporcelain.txt[]
Junio C Hamanoe31bb3b2005-08-15 15:48:47 -0700546
Yasushi SHOJI90933ef2005-08-16 00:23:06 +0900547Ancillary Commands
J. Bruce Fields23091e92006-04-02 17:54:34 -0400548~~~~~~~~~~~~~~~~~~
David Greaves204ee6a2005-05-10 22:32:37 +0100549Manipulators:
550
Junio C Hamano377e8132007-01-18 15:03:13 -0800551include::cmds-ancillarymanipulators.txt[]
Junio C Hamano7fc9d692005-08-23 01:49:47 -0700552
Junio C Hamanof85a4192005-08-29 17:21:06 -0700553Interrogators:
Junio C Hamano7fc9d692005-08-23 01:49:47 -0700554
Junio C Hamano377e8132007-01-18 15:03:13 -0800555include::cmds-ancillaryinterrogators.txt[]
Junio C Hamano35ef3a42005-09-07 23:04:52 -0700556
Junio C Hamano89bf2072007-01-18 22:32:38 -0800557
558Interacting with Others
559~~~~~~~~~~~~~~~~~~~~~~~
560
561These commands are to interact with foreign SCM and with other
562people via patch over e-mail.
563
564include::cmds-foreignscminterface.txt[]
565
566
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100567Low-level commands (plumbing)
568-----------------------------
569
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100570Although Git includes its
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100571own porcelain layer, its low-level commands are sufficient to support
572development of alternative porcelains. Developers of such porcelains
Dan McGee5162e692007-12-29 00:20:38 -0600573might start by reading about linkgit:git-update-index[1] and
574linkgit:git-read-tree[1].
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100575
Junio C Hamano89bf2072007-01-18 22:32:38 -0800576The interface (input, output, set of options and the semantics)
577to these low-level commands are meant to be a lot more stable
578than Porcelain level commands, because these commands are
579primarily for scripted use. The interface to Porcelain commands
580on the other hand are subject to change in order to improve the
581end user experience.
582
583The following description divides
584the low-level commands into commands that manipulate objects (in
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100585the repository, index, and working tree), commands that interrogate and
586compare objects, and commands that move objects and references between
587repositories.
588
Junio C Hamano89bf2072007-01-18 22:32:38 -0800589
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100590Manipulation commands
591~~~~~~~~~~~~~~~~~~~~~
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100592
Junio C Hamano377e8132007-01-18 15:03:13 -0800593include::cmds-plumbingmanipulators.txt[]
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100594
595
596Interrogation commands
597~~~~~~~~~~~~~~~~~~~~~~
598
Junio C Hamano377e8132007-01-18 15:03:13 -0800599include::cmds-plumbinginterrogators.txt[]
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100600
601In general, the interrogate commands do not touch the files in
602the working tree.
603
604
605Synching repositories
606~~~~~~~~~~~~~~~~~~~~~
607
Junio C Hamano377e8132007-01-18 15:03:13 -0800608include::cmds-synchingrepositories.txt[]
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100609
Ori Avtalion57f6ec02009-08-07 17:24:21 +0300610The following are helper commands used by the above; end users
Junio C Hamano89bf2072007-01-18 22:32:38 -0800611typically do not use them directly.
612
613include::cmds-synchelpers.txt[]
614
615
616Internal helper commands
617~~~~~~~~~~~~~~~~~~~~~~~~
618
619These are internal helper commands used by other commands; end
620users typically do not use them directly.
621
622include::cmds-purehelpers.txt[]
623
Robin Rosenbergb1f33d62006-10-29 21:09:48 +0100624
Junio C Hamano5773c9f2005-10-29 14:32:56 -0700625Configuration Mechanism
626-----------------------
627
Matthieu Moyc0179c02013-02-14 16:36:54 +0100628Git uses a simple text format to store customizations that are per
629repository and are per user. Such a configuration file may look
630like this:
Junio C Hamano5773c9f2005-10-29 14:32:56 -0700631
632------------
633#
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800634# A '#' or ';' character indicates a comment.
Junio C Hamano5773c9f2005-10-29 14:32:56 -0700635#
636
637; core variables
638[core]
639 ; Don't trust file modes
640 filemode = false
641
642; user identity
643[user]
644 name = "Junio C Hamano"
Matthieu Moyc0179c02013-02-14 16:36:54 +0100645 email = "gitster@pobox.com"
Junio C Hamano5773c9f2005-10-29 14:32:56 -0700646
647------------
648
649Various commands read from the configuration file and adjust
Jonathan Nieder06300d92010-02-14 06:02:35 -0600650their operation accordingly. See linkgit:git-config[1] for a
Matthieu Moyc0179c02013-02-14 16:36:54 +0100651list and more details about the configuration mechanism.
Junio C Hamano5773c9f2005-10-29 14:32:56 -0700652
653
David Greaves6c84e2e2005-05-22 18:44:16 +0100654Identifier Terminology
David Greaves2cf565c2005-05-10 22:32:30 +0100655----------------------
656<object>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800657 Indicates the object name for any type of object.
David Greaves2cf565c2005-05-10 22:32:30 +0100658
659<blob>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800660 Indicates a blob object name.
David Greaves2cf565c2005-05-10 22:32:30 +0100661
662<tree>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800663 Indicates a tree object name.
David Greaves2cf565c2005-05-10 22:32:30 +0100664
665<commit>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800666 Indicates a commit object name.
David Greaves2cf565c2005-05-10 22:32:30 +0100667
668<tree-ish>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800669 Indicates a tree, commit or tag object name. A
David Greaves6c84e2e2005-05-22 18:44:16 +0100670 command that takes a <tree-ish> argument ultimately wants to
671 operate on a <tree> object but automatically dereferences
672 <commit> and <tag> objects that point at a <tree>.
David Greaves2cf565c2005-05-10 22:32:30 +0100673
Theodore Ts'o043d7602007-03-05 14:46:05 -0500674<commit-ish>::
675 Indicates a commit or tag object name. A
676 command that takes a <commit-ish> argument ultimately wants to
677 operate on a <commit> object but automatically dereferences
678 <tag> objects that point at a <commit>.
679
David Greaves2cf565c2005-05-10 22:32:30 +0100680<type>::
681 Indicates that an object type is required.
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800682 Currently one of: `blob`, `tree`, `commit`, or `tag`.
David Greaves2cf565c2005-05-10 22:32:30 +0100683
684<file>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800685 Indicates a filename - almost always relative to the
686 root of the tree structure `GIT_INDEX_FILE` describes.
David Greaves2cf565c2005-05-10 22:32:30 +0100687
David Greavesc1bdacf2005-05-10 22:32:38 +0100688Symbolic Identifiers
689--------------------
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100690Any Git command accepting any <object> can also use the following
David Greaves6c84e2e2005-05-22 18:44:16 +0100691symbolic notation:
David Greavesc1bdacf2005-05-10 22:32:38 +0100692
693HEAD::
Junio C Hamano0abcfbf2011-06-23 09:35:10 -0700694 indicates the head of the current branch.
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800695
David Greavesc1bdacf2005-05-10 22:32:38 +0100696<tag>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800697 a valid tag 'name'
Junio C Hamano0abcfbf2011-06-23 09:35:10 -0700698 (i.e. a `refs/tags/<tag>` reference).
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800699
David Greavesc1bdacf2005-05-10 22:32:38 +0100700<head>::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800701 a valid head 'name'
Junio C Hamano0abcfbf2011-06-23 09:35:10 -0700702 (i.e. a `refs/heads/<head>` reference).
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800703
Junio C Hamanod47107d2006-10-25 11:33:08 -0700704For a more complete list of ways to spell object names, see
Jonathan Nieder9d83e382010-10-11 11:03:32 -0500705"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
Junio C Hamanod47107d2006-10-25 11:33:08 -0700706
David Greavesc1bdacf2005-05-10 22:32:38 +0100707
708File/Directory Structure
709------------------------
David Greavesc1bdacf2005-05-10 22:32:38 +0100710
Jonathan Nieder6998e4d2008-06-30 17:01:21 -0500711Please see the linkgit:gitrepository-layout[5] document.
David Greavesc1bdacf2005-05-10 22:32:38 +0100712
Jonathan Nieder6998e4d2008-06-30 17:01:21 -0500713Read linkgit:githooks[5] for more details about each hook.
Jon Loeliger6250ad12006-03-24 21:21:07 -0600714
David Greavesc1bdacf2005-05-10 22:32:38 +0100715Higher level SCMs may provide and manage additional information in the
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800716`$GIT_DIR`.
David Greavesc1bdacf2005-05-10 22:32:38 +0100717
Junio C Hamanoa1d4aa72005-09-01 16:56:13 -0700718
David Greaves2cf565c2005-05-10 22:32:30 +0100719Terminology
720-----------
Jonathan Nieder6998e4d2008-06-30 17:01:21 -0500721Please see linkgit:gitglossary[7].
David Greaves2cf565c2005-05-10 22:32:30 +0100722
723
724Environment Variables
725---------------------
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100726Various Git commands use the following environment variables:
David Greaves2cf565c2005-05-10 22:32:30 +0100727
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100728The Git Repository
David Greavesc1bdacf2005-05-10 22:32:38 +0100729~~~~~~~~~~~~~~~~~~
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100730These environment variables apply to 'all' core Git commands. Nb: it
David Greavesc1bdacf2005-05-10 22:32:38 +0100731is worth noting that they may be used/overridden by SCMS sitting above
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100732Git so take care if using Cogito etc.
David Greaves2cf565c2005-05-10 22:32:30 +0100733
David Greavesc1bdacf2005-05-10 22:32:38 +0100734'GIT_INDEX_FILE'::
735 This environment allows the specification of an alternate
Lukas_Sandström5f3aa192005-11-11 02:12:27 +0100736 index file. If not specified, the default of `$GIT_DIR/index`
737 is used.
David Greavesc1bdacf2005-05-10 22:32:38 +0100738
Thomas Gummerer136347d2014-02-23 21:49:57 +0100739'GIT_INDEX_VERSION'::
740 This environment variable allows the specification of an index
741 version for new repositories. It won't affect existing index
742 files. By default index file version [23] is used.
743
David Greavesc1bdacf2005-05-10 22:32:38 +0100744'GIT_OBJECT_DIRECTORY'::
745 If the object storage directory is specified via this
746 environment variable then the sha1 directories are created
747 underneath - otherwise the default `$GIT_DIR/objects`
748 directory is used.
749
750'GIT_ALTERNATE_OBJECT_DIRECTORIES'::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100751 Due to the immutable nature of Git objects, old objects can be
David Greavesc1bdacf2005-05-10 22:32:38 +0100752 archived into shared, read-only directories. This variable
Johannes Sixt80ba0742007-12-03 21:55:57 +0100753 specifies a ":" separated (on Windows ";" separated) list
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100754 of Git object directories which can be used to search for Git
Johannes Sixt80ba0742007-12-03 21:55:57 +0100755 objects. New objects will not be written to these directories.
David Greavesc1bdacf2005-05-10 22:32:38 +0100756
757'GIT_DIR'::
Junio C Hamano2fa090b2005-12-07 16:05:21 -0800758 If the 'GIT_DIR' environment variable is set then it
759 specifies a path to use instead of the default `.git`
760 for the base of the repository.
Manlio Perillo75940a02012-12-13 18:57:19 +0100761 The '--git-dir' command-line option also sets this value.
David Greavesc1bdacf2005-05-10 22:32:38 +0100762
Matthias Lederhofer892c41b2007-06-06 09:10:42 +0200763'GIT_WORK_TREE'::
Chris Rorvicka758a342013-05-30 20:11:41 -0500764 Set the path to the root of the working tree.
Matthias Lederhofer892c41b2007-06-06 09:10:42 +0200765 This can also be controlled by the '--work-tree' command line
766 option and the core.worktree configuration variable.
767
Josh Triplettd49483f2011-07-08 16:14:10 -0700768'GIT_NAMESPACE'::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100769 Set the Git namespace; see linkgit:gitnamespaces[7] for details.
Josh Triplettd49483f2011-07-08 16:14:10 -0700770 The '--namespace' command-line option also sets this value.
771
David Reiss0454dd92008-05-19 23:49:26 -0700772'GIT_CEILING_DIRECTORIES'::
Michael Haggerty7ec30aa2013-02-20 10:09:24 +0100773 This should be a colon-separated list of absolute paths. If
Junio C Hamano3e07d262013-02-27 09:47:27 -0800774 set, it is a list of directories that Git should not chdir up
Michael Haggerty7ec30aa2013-02-20 10:09:24 +0100775 into while looking for a repository directory (useful for
776 excluding slow-loading network directories). It will not
777 exclude the current working directory or a GIT_DIR set on the
778 command line or in the environment. Normally, Git has to read
779 the entries in this list and resolve any symlink that
780 might be present in order to compare them with the current
781 directory. However, if even this access is slow, you
782 can add an empty entry to the list to tell Git that the
783 subsequent entries are not symlinks and needn't be resolved;
784 e.g.,
785 'GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink'.
David Reiss0454dd92008-05-19 23:49:26 -0700786
Junio C Hamanocf874632010-04-04 14:49:31 -0700787'GIT_DISCOVERY_ACROSS_FILESYSTEM'::
Junio C Hamanoe6405512010-04-04 10:33:53 -0700788 When run in a directory that does not have ".git" repository
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100789 directory, Git tries to find such a directory in the parent
Junio C Hamanoe6405512010-04-04 10:33:53 -0700790 directories to find the top of the working tree, but by default it
791 does not cross filesystem boundaries. This environment variable
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100792 can be set to true to tell Git not to stop at filesystem
Junio C Hamanocf874632010-04-04 14:49:31 -0700793 boundaries. Like 'GIT_CEILING_DIRECTORIES', this will not affect
794 an explicit repository directory set via 'GIT_DIR' or on the
795 command line.
Lars R. Damerow8030e442010-03-17 12:55:53 -0700796
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100797Git Commits
David Greavesc1bdacf2005-05-10 22:32:38 +0100798~~~~~~~~~~~
799'GIT_AUTHOR_NAME'::
800'GIT_AUTHOR_EMAIL'::
801'GIT_AUTHOR_DATE'::
802'GIT_COMMITTER_NAME'::
803'GIT_COMMITTER_EMAIL'::
Josh Triplett4e58bf92007-04-28 18:40:12 -0700804'GIT_COMMITTER_DATE'::
Josh Triplett28a94f82007-04-28 18:40:28 -0700805'EMAIL'::
Dan McGee5162e692007-12-29 00:20:38 -0600806 see linkgit:git-commit-tree[1]
David Greavesc1bdacf2005-05-10 22:32:38 +0100807
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100808Git Diffs
David Greavesc1bdacf2005-05-10 22:32:38 +0100809~~~~~~~~~
Junio C Hamanod81ed1b2005-05-10 20:54:57 -0700810'GIT_DIFF_OPTS'::
Seanfde97d82006-11-27 14:37:43 -0500811 Only valid setting is "--unified=??" or "-u??" to set the
812 number of context lines shown when a unified diff is created.
813 This takes precedence over any "-U" or "--unified" option
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100814 value passed on the Git diff command line.
Seanfde97d82006-11-27 14:37:43 -0500815
Junio C Hamanod81ed1b2005-05-10 20:54:57 -0700816'GIT_EXTERNAL_DIFF'::
Seanfde97d82006-11-27 14:37:43 -0500817 When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
818 program named by it is called, instead of the diff invocation
819 described above. For a path that is added, removed, or modified,
820 'GIT_EXTERNAL_DIFF' is called with 7 parameters:
821
822 path old-file old-hex old-mode new-file new-hex new-mode
823+
824where:
825
826 <old|new>-file:: are files GIT_EXTERNAL_DIFF can use to read the
827 contents of <old|new>,
Thomas Ackermannd5fa1f12013-04-15 19:49:04 +0200828 <old|new>-hex:: are the 40-hexdigit SHA-1 hashes,
Seanfde97d82006-11-27 14:37:43 -0500829 <old|new>-mode:: are the octal representation of the file modes.
Seanfde97d82006-11-27 14:37:43 -0500830+
831The file parameters can point at the user's working file
832(e.g. `new-file` in "git-diff-files"), `/dev/null` (e.g. `old-file`
833when a new file is added), or a temporary file (e.g. `old-file` in the
834index). 'GIT_EXTERNAL_DIFF' should not worry about unlinking the
835temporary file --- it is removed when 'GIT_EXTERNAL_DIFF' exits.
836+
837For a path that is unmerged, 'GIT_EXTERNAL_DIFF' is called with 1
838parameter, <path>.
Zoltan Klingeree7fb0b2013-12-06 10:38:46 +1100839+
840For each path 'GIT_EXTERNAL_DIFF' is called, two environment variables,
841'GIT_DIFF_PATH_COUNTER' and 'GIT_DIFF_PATH_TOTAL' are set.
842
843'GIT_DIFF_PATH_COUNTER'::
844 A 1-based counter incremented by one for every path.
845
846'GIT_DIFF_PATH_TOTAL'::
847 The total number of paths.
David Greaves2cf565c2005-05-10 22:32:30 +0100848
Matthias Lederhofer575ba9d2006-06-25 15:56:18 +0200849other
850~~~~~
Jakub Narebskidbddb712007-07-13 01:54:06 +0200851'GIT_MERGE_VERBOSITY'::
852 A number controlling the amount of output shown by
853 the recursive merge strategy. Overrides merge.verbosity.
Dan McGee5162e692007-12-29 00:20:38 -0600854 See linkgit:git-merge[1]
Jakub Narebskidbddb712007-07-13 01:54:06 +0200855
Matthias Lederhoferc27d2052006-07-31 15:27:00 +0200856'GIT_PAGER'::
Steven Grimma7738c72007-07-19 03:43:51 -0700857 This environment variable overrides `$PAGER`. If it is set
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100858 to an empty string or to the value "cat", Git will not launch
Jonathan Niederab54cd62008-08-24 00:28:32 -0500859 a pager. See also the `core.pager` option in
860 linkgit:git-config[1].
Matthias Lederhoferc27d2052006-07-31 15:27:00 +0200861
Rodrigo Silva (MestreLion)36384c92012-03-23 12:38:42 +0000862'GIT_EDITOR'::
863 This environment variable overrides `$EDITOR` and `$VISUAL`.
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100864 It is used by several Git commands when, on interactive mode,
Rodrigo Silva (MestreLion)36384c92012-03-23 12:38:42 +0000865 an editor is to be launched. See also linkgit:git-var[1]
866 and the `core.editor` option in linkgit:git-config[1].
867
Shawn O. Pearced5538b42007-08-04 02:06:52 -0400868'GIT_SSH'::
Thomas Rast0b444cd2010-01-10 00:33:00 +0100869 If this environment variable is set then 'git fetch'
870 and 'git push' will use this command instead
Jonathan Nieder2fd02c92008-07-03 00:55:07 -0500871 of 'ssh' when they need to connect to a remote system.
Dan Bornsteine39c6952013-03-21 23:06:40 +0000872 The '$GIT_SSH' command will be given exactly two or
873 four arguments: the 'username@host' (or just 'host')
874 from the URL and the shell command to execute on that
875 remote system, optionally preceded by '-p' (literally) and
876 the 'port' from the URL when it specifies something other
877 than the default SSH port.
Shawn O. Pearced5538b42007-08-04 02:06:52 -0400878+
879To pass options to the program that you want to list in GIT_SSH
880you will need to wrap the program and options into a shell script,
881then set GIT_SSH to refer to the shell script.
882+
883Usually it is easier to configure any desired options through your
884personal `.ssh/config` file. Please consult your ssh documentation
885for further details.
886
Knut Franke453842c2010-08-30 15:40:29 +0200887'GIT_ASKPASS'::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100888 If this environment variable is set, then Git commands which need to
Knut Franke453842c2010-08-30 15:40:29 +0200889 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
890 will call this program with a suitable prompt as command line argument
891 and read the password from its STDOUT. See also the 'core.askpass'
892 option in linkgit:git-config[1].
893
Jonathan Niedere8ef4012012-10-14 01:53:59 -0700894'GIT_CONFIG_NOSYSTEM'::
895 Whether to skip reading settings from the system-wide
896 `$(prefix)/etc/gitconfig` file. This environment variable can
897 be used along with `$HOME` and `$XDG_CONFIG_HOME` to create a
898 predictable environment for a picky script, or you can set it
899 temporarily to avoid using a buggy `/etc/gitconfig` file while
900 waiting for someone with sufficient permissions to fix it.
901
Theodore Ts'o06f59e92007-06-29 13:40:46 -0400902'GIT_FLUSH'::
903 If this environment variable is set to "1", then commands such
Thomas Rast0b444cd2010-01-10 00:33:00 +0100904 as 'git blame' (in incremental mode), 'git rev-list', 'git log',
Junio C Hamano627a8b82013-08-09 10:28:53 -0700905 'git check-attr' and 'git check-ignore' will
Adam Spiersf1ed7fe2013-04-11 13:05:13 +0100906 force a flush of the output stream after each record have been
907 flushed. If this
Theodore Ts'o06f59e92007-06-29 13:40:46 -0400908 variable is set to "0", the output of these commands will be done
909 using completely buffered I/O. If this environment variable is
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100910 not set, Git will choose buffered or record-oriented flushing
Theodore Ts'o06f59e92007-06-29 13:40:46 -0400911 based on whether stdout appears to be redirected to a file or not.
912
Matthias Lederhofer575ba9d2006-06-25 15:56:18 +0200913'GIT_TRACE'::
Christian Couder2886bdb2006-09-03 17:32:24 +0200914 If this variable is set to "1", "2" or "true" (comparison
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100915 is case insensitive), Git will print `trace:` messages on
Matthias Lederhofer575ba9d2006-06-25 15:56:18 +0200916 stderr telling about alias expansion, built-in command
917 execution and external command execution.
Christian Couder2886bdb2006-09-03 17:32:24 +0200918 If this variable is set to an integer value greater than 1
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100919 and lower than 10 (strictly) then Git will interpret this
Christian Couder2886bdb2006-09-03 17:32:24 +0200920 value as an open file descriptor and will try to write the
921 trace messages into this file descriptor.
922 Alternatively, if this variable is set to an absolute path
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100923 (starting with a '/' character), Git will interpret this
Christian Couder2886bdb2006-09-03 17:32:24 +0200924 as a file path and will try to write the trace messages
925 into it.
Matthias Lederhofer575ba9d2006-06-25 15:56:18 +0200926
Nguyễn Thái Ngọc Duyb12ca962013-06-09 12:22:48 +0700927'GIT_TRACE_PACK_ACCESS'::
928 If this variable is set to a path, a file will be created at
929 the given path logging all accesses to any packs. For each
930 access, the pack file name and an offset in the pack is
931 recorded. This may be helpful for troubleshooting some
932 pack-related performance problems.
933
Nguyễn Thái Ngọc Duy1dd278c2013-06-09 12:22:49 +0700934'GIT_TRACE_PACKET'::
935 If this variable is set, it shows a trace of all packets
936 coming in or out of a given program. This can help with
937 debugging object negotiation or other protocol issues. Tracing
938 is turned off at a packet starting with "PACK".
939
Jeff King823ab402012-12-19 17:37:30 -0500940GIT_LITERAL_PATHSPECS::
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100941 Setting this variable to `1` will cause Git to treat all
Jeff King823ab402012-12-19 17:37:30 -0500942 pathspecs literally, rather than as glob patterns. For example,
943 running `GIT_LITERAL_PATHSPECS=1 git log -- '*.c'` will search
944 for commits that touch the path `*.c`, not any paths that the
945 glob `*.c` matches. You might want this if you are feeding
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100946 literal paths to Git (e.g., paths previously given to you by
Jeff King823ab402012-12-19 17:37:30 -0500947 `git ls-tree`, `--raw` diff output, etc).
948
Nguyễn Thái Ngọc Duybd30c2e2013-07-14 15:36:08 +0700949GIT_GLOB_PATHSPECS::
950 Setting this variable to `1` will cause Git to treat all
951 pathspecs as glob patterns (aka "glob" magic).
952
953GIT_NOGLOB_PATHSPECS::
954 Setting this variable to `1` will cause Git to treat all
955 pathspecs as literal (aka "literal" magic).
956
Nguyễn Thái Ngọc Duy93d93532013-07-14 15:36:09 +0700957GIT_ICASE_PATHSPECS::
958 Setting this variable to `1` will cause Git to treat all
959 pathspecs as case-insensitive.
960
Junio C Hamanoc3e2d182013-06-19 10:54:00 -0700961'GIT_REFLOG_ACTION'::
962 When a ref is updated, reflog entries are created to keep
963 track of the reason why the ref was updated (which is
964 typically the name of the high-level command that updated
965 the ref), in addition to the old and new values of the ref.
966 A scripted Porcelain command can use set_reflog_action
967 helper function in `git-sh-setup` to set its name to this
968 variable when it is invoked as the top level command by the
969 end user, to be recorded in the body of the reflog.
970
Jeff King823ab402012-12-19 17:37:30 -0500971
Junio C Hamano8db93072005-08-30 13:51:01 -0700972Discussion[[Discussion]]
973------------------------
J. Bruce Fields40dac512007-09-03 00:01:19 -0400974
975More detail on the following is available from the
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100976link:user-manual.html#git-concepts[Git concepts chapter of the
Jonathan Nieder6998e4d2008-06-30 17:01:21 -0500977user-manual] and linkgit:gitcore-tutorial[7].
J. Bruce Fields40dac512007-09-03 00:01:19 -0400978
Thomas Ackermann2de9b712013-01-21 20:17:53 +0100979A Git project normally consists of a working directory with a ".git"
J. Bruce Fields40dac512007-09-03 00:01:19 -0400980subdirectory at the top level. The .git directory contains, among other
981things, a compressed object database representing the complete history
982of the project, an "index" file which links that history to the current
983contents of the working tree, and named pointers into that history such
984as tags and branch heads.
985
986The object database contains objects of three main types: blobs, which
987hold file data; trees, which point to blobs and other trees to build up
Ralf Wildenhues02ff6252007-12-18 07:07:36 +0100988directory hierarchies; and commits, which each reference a single tree
J. Bruce Fields40dac512007-09-03 00:01:19 -0400989and some number of parent commits.
990
991The commit, equivalent to what other systems call a "changeset" or
992"version", represents a step in the project's history, and each parent
993represents an immediately preceding step. Commits with more than one
994parent represent merges of independent lines of development.
995
Thomas Ackermannd5fa1f12013-04-15 19:49:04 +0200996All objects are named by the SHA-1 hash of their contents, normally
J. Bruce Fields40dac512007-09-03 00:01:19 -0400997written as a string of 40 hex digits. Such names are globally unique.
998The entire history leading up to a commit can be vouched for by signing
999just that commit. A fourth object type, the tag, is provided for this
1000purpose.
1001
1002When first created, objects are stored in individual files, but for
1003efficiency may later be compressed together into "pack files".
1004
1005Named pointers called refs mark interesting points in history. A ref
Thomas Ackermannd5fa1f12013-04-15 19:49:04 +02001006may contain the SHA-1 name of an object or the name of another ref. Refs
1007with names beginning `ref/head/` contain the SHA-1 name of the most
1008recent commit (or "head") of a branch under development. SHA-1 names of
J. Bruce Fields40dac512007-09-03 00:01:19 -04001009tags of interest are stored under `ref/tags/`. A special ref named
1010`HEAD` contains the name of the currently checked-out branch.
1011
1012The index file is initialized with a list of all paths and, for each
1013path, a blob object and a set of attributes. The blob object represents
1014the contents of the file as of the head of the current branch. The
1015attributes (last modified time, size, etc.) are taken from the
1016corresponding file in the working tree. Subsequent changes to the
1017working tree can be found by comparing these attributes. The index may
1018be updated with new content, and new commits may be created from the
1019content stored in the index.
1020
1021The index is also capable of storing multiple entries (called "stages")
1022for a given pathname. These stages are used to hold the various
1023unmerged version of a file when a merge is in progress.
David Greaves6c84e2e2005-05-22 18:44:16 +01001024
Junio C Hamano7687ae92012-08-17 12:48:52 -07001025FURTHER DOCUMENTATION
1026---------------------
1027
1028See the references in the "description" section to get started
Thomas Ackermann2de9b712013-01-21 20:17:53 +01001029using Git. The following is probably more detail than necessary
Junio C Hamano7687ae92012-08-17 12:48:52 -07001030for a first-time user.
1031
Thomas Ackermann2de9b712013-01-21 20:17:53 +01001032The link:user-manual.html#git-concepts[Git concepts chapter of the
Junio C Hamano7687ae92012-08-17 12:48:52 -07001033user-manual] and linkgit:gitcore-tutorial[7] both provide
Thomas Ackermann2de9b712013-01-21 20:17:53 +01001034introductions to the underlying Git architecture.
Junio C Hamano7687ae92012-08-17 12:48:52 -07001035
1036See linkgit:gitworkflows[7] for an overview of recommended workflows.
1037
1038See also the link:howto-index.html[howto] documents for some useful
1039examples.
1040
1041The internals are documented in the
Thomas Ackermann48a8c262013-01-21 20:16:20 +01001042link:technical/api-index.html[Git API documentation].
Junio C Hamano7687ae92012-08-17 12:48:52 -07001043
1044Users migrating from CVS may also want to
1045read linkgit:gitcvs-migration[7].
1046
1047
Andreas Ericssoncb22bc42005-11-16 00:31:25 +01001048Authors
1049-------
Jeff King48bb9142011-03-11 00:52:08 -05001050Git was started by Linus Torvalds, and is currently maintained by Junio
Thomas Ackermann2de9b712013-01-21 20:17:53 +01001051C Hamano. Numerous contributions have come from the Git mailing list
Stefan Beller405869d2014-07-23 14:32:09 +02001052<git@vger.kernel.org>. http://www.openhub.net/p/git/contributors/summary
Junio C Hamano6ecc01f2012-12-12 10:06:24 -08001053gives you a more complete list of contributors.
1054
1055If you have a clone of git.git itself, the
Jeff Kingd8f708f2011-03-12 22:00:38 -05001056output of linkgit:git-shortlog[1] and linkgit:git-blame[1] can show you
1057the authors for specific parts of the project.
David Greaves2cf565c2005-05-10 22:32:30 +01001058
Junio C Hamanoc97ca272010-08-02 09:07:39 -07001059Reporting Bugs
1060--------------
1061
1062Report bugs to the Git mailing list <git@vger.kernel.org> where the
1063development and maintenance is primarily done. You do not have to be
1064subscribed to the list to send a message there.
1065
Christian Couder497c8332008-05-29 19:21:46 +02001066SEE ALSO
1067--------
1068linkgit:gittutorial[7], linkgit:gittutorial-2[7],
Jon Jensen5cbef012008-08-02 15:41:48 -06001069link:everyday.html[Everyday Git], linkgit:gitcvs-migration[7],
Christian Couder497c8332008-05-29 19:21:46 +02001070linkgit:gitglossary[7], linkgit:gitcore-tutorial[7],
Thomas Rast801a0112009-06-06 15:11:07 +02001071linkgit:gitcli[7], link:user-manual.html[The Git User's Manual],
1072linkgit:gitworkflows[7]
Christian Couder497c8332008-05-29 19:21:46 +02001073
David Greaves2cf565c2005-05-10 22:32:30 +01001074GIT
1075---
Christian Couder9e1f0a82008-06-06 09:07:32 +02001076Part of the linkgit:git[1] suite