make some more strings translatable
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / gitrepository-layout.html.xml
blobc2a7b6e155ee2a084940b3bd8938924a39aff25b
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
3 \r
4 <article lang="en" id="gitrepository-layout(5)">\r
5 <articleinfo>\r
6     <title>gitrepository-layout(5)</title>\r
7         <indexterm>\r
8                 <primary>gitrepository-layout(5)</primary>\r
9         </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>gitrepository-layout - Git Repository Layout</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <simpara>$GIT_DIR/*</simpara>\r
18 </simplesect>\r
19 <simplesect id="_description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>You may find these things in your git repository (<literal>.git</literal>\r
22 directory for a repository associated with your working tree, or\r
23 <literal>&lt;project&gt;.git</literal> directory for a public <emphasis>bare</emphasis> repository. It is\r
24 also possible to have a working tree where <literal>.git</literal> is a plain\r
25 ascii file containing <literal>gitdir: &lt;path&gt;</literal>, i.e. the path to the\r
26 real git repository).</simpara>\r
27 <variablelist>\r
28 <varlistentry>\r
29 <term>\r
30 objects\r
31 </term>\r
32 <listitem>\r
33 <simpara>\r
34         Object store associated with this repository.  Usually\r
35         an object store is self sufficient (i.e. all the objects\r
36         that are referred to by an object found in it are also\r
37         found in it), but there are couple of ways to violate\r
38         it.\r
39 </simpara>\r
40 <orderedlist numeration="arabic">\r
41 <listitem>\r
42 <simpara>\r
43 You could populate the repository by running a commit walker\r
44 without <literal>-a</literal> option.  Depending on which options are given, you\r
45 could have only commit objects without associated blobs and\r
46 trees this way, for example.  A repository with this kind of\r
47 incomplete object store is not suitable to be published to the\r
48 outside world but sometimes useful for private repository.\r
49 </simpara>\r
50 </listitem>\r
51 <listitem>\r
52 <simpara>\r
53 You also could have an incomplete but locally usable repository\r
54 by cloning shallowly.  See <xref linkend="git-clone(1)"/>.\r
55 </simpara>\r
56 </listitem>\r
57 <listitem>\r
58 <simpara>\r
59 You can be using <literal>objects/info/alternates</literal> mechanism, or\r
60 <literal>$GIT_ALTERNATE_OBJECT_DIRECTORIES</literal> mechanism to <emphasis>borrow</emphasis>\r
61 objects from other object stores.  A repository with this kind\r
62 of incomplete object store is not suitable to be published for\r
63 use with dumb transports but otherwise is OK as long as\r
64 <literal>objects/info/alternates</literal> points at the right object stores\r
65 it borrows from.\r
66 </simpara>\r
67 </listitem>\r
68 </orderedlist>\r
69 </listitem>\r
70 </varlistentry>\r
71 <varlistentry>\r
72 <term>\r
73 objects/[0-9a-f][0-9a-f]\r
74 </term>\r
75 <listitem>\r
76 <simpara>\r
77         Traditionally, each object is stored in its own file.\r
78         They are split into 256 subdirectories using the first\r
79         two letters from its object name to keep the number of\r
80         directory entries <literal>objects</literal> directory itself needs to\r
81         hold.  Objects found here are often called <emphasis>unpacked</emphasis>\r
82         (or <emphasis>loose</emphasis>) objects.\r
83 </simpara>\r
84 </listitem>\r
85 </varlistentry>\r
86 <varlistentry>\r
87 <term>\r
88 objects/pack\r
89 </term>\r
90 <listitem>\r
91 <simpara>\r
92         Packs (files that store many object in compressed form,\r
93         along with index files to allow them to be randomly\r
94         accessed) are found in this directory.\r
95 </simpara>\r
96 </listitem>\r
97 </varlistentry>\r
98 <varlistentry>\r
99 <term>\r
100 objects/info\r
101 </term>\r
102 <listitem>\r
103 <simpara>\r
104         Additional information about the object store is\r
105         recorded in this directory.\r
106 </simpara>\r
107 </listitem>\r
108 </varlistentry>\r
109 <varlistentry>\r
110 <term>\r
111 objects/info/packs\r
112 </term>\r
113 <listitem>\r
114 <simpara>\r
115         This file is to help dumb transports discover what packs\r
116         are available in this object store.  Whenever a pack is\r
117         added or removed, <literal>git update-server-info</literal> should be run\r
118         to keep this file up-to-date if the repository is\r
119         published for dumb transports.  <emphasis>git-repack</emphasis> does this\r
120         by default.\r
121 </simpara>\r
122 </listitem>\r
123 </varlistentry>\r
124 <varlistentry>\r
125 <term>\r
126 objects/info/alternates\r
127 </term>\r
128 <listitem>\r
129 <simpara>\r
130         This file records paths to alternate object stores that\r
131         this object store borrows objects from, one pathname per\r
132         line. Note that not only native Git tools use it locally,\r
133         but the HTTP fetcher also tries to use it remotely; this\r
134         will usually work if you have relative paths (relative\r
135         to the object database, not to the repository!) in your\r
136         alternates file, but it will not work if you use absolute\r
137         paths unless the absolute path in filesystem and web URL\r
138         is the same. See also <emphasis>objects/info/http-alternates</emphasis>.\r
139 </simpara>\r
140 </listitem>\r
141 </varlistentry>\r
142 <varlistentry>\r
143 <term>\r
144 objects/info/http-alternates\r
145 </term>\r
146 <listitem>\r
147 <simpara>\r
148         This file records URLs to alternate object stores that\r
149         this object store borrows objects from, to be used when\r
150         the repository is fetched over HTTP.\r
151 </simpara>\r
152 </listitem>\r
153 </varlistentry>\r
154 <varlistentry>\r
155 <term>\r
156 refs\r
157 </term>\r
158 <listitem>\r
159 <simpara>\r
160         References are stored in subdirectories of this\r
161         directory.  The <emphasis>git-prune</emphasis> command knows to keep\r
162         objects reachable from refs found in this directory and\r
163         its subdirectories.\r
164 </simpara>\r
165 </listitem>\r
166 </varlistentry>\r
167 <varlistentry>\r
168 <term>\r
169 refs/heads/<literal>name</literal>\r
170 </term>\r
171 <listitem>\r
172 <simpara>\r
173         records tip-of-the-tree commit objects of branch <literal>name</literal>\r
174 </simpara>\r
175 </listitem>\r
176 </varlistentry>\r
177 <varlistentry>\r
178 <term>\r
179 refs/tags/<literal>name</literal>\r
180 </term>\r
181 <listitem>\r
182 <simpara>\r
183         records any object name (not necessarily a commit\r
184         object, or a tag object that points at a commit object).\r
185 </simpara>\r
186 </listitem>\r
187 </varlistentry>\r
188 <varlistentry>\r
189 <term>\r
190 refs/remotes/<literal>name</literal>\r
191 </term>\r
192 <listitem>\r
193 <simpara>\r
194         records tip-of-the-tree commit objects of branches copied\r
195         from a remote repository.\r
196 </simpara>\r
197 </listitem>\r
198 </varlistentry>\r
199 <varlistentry>\r
200 <term>\r
201 packed-refs\r
202 </term>\r
203 <listitem>\r
204 <simpara>\r
205         records the same information as refs/heads/, refs/tags/,\r
206         and friends record in a more efficient way.  See\r
207         <xref linkend="git-pack-refs(1)"/>.\r
208 </simpara>\r
209 </listitem>\r
210 </varlistentry>\r
211 <varlistentry>\r
212 <term>\r
213 HEAD\r
214 </term>\r
215 <listitem>\r
216 <simpara>\r
217         A symref (see glossary) to the <literal>refs/heads/</literal> namespace\r
218         describing the currently active branch.  It does not mean\r
219         much if the repository is not associated with any working tree\r
220         (i.e. a <emphasis>bare</emphasis> repository), but a valid git repository\r
221         <emphasis role="strong">must</emphasis> have the HEAD file; some porcelains may use it to\r
222         guess the designated "default" branch of the repository\r
223         (usually <emphasis>master</emphasis>).  It is legal if the named branch\r
224         <emphasis>name</emphasis> does not (yet) exist.  In some legacy setups, it is\r
225         a symbolic link instead of a symref that points at the current\r
226         branch.\r
227 </simpara>\r
228 <simpara>HEAD can also record a specific commit directly, instead of\r
229 being a symref to point at the current branch.  Such a state\r
230 is often called <emphasis>detached HEAD</emphasis>, and almost all commands work\r
231 identically as normal.  See <xref linkend="git-checkout(1)"/> for\r
232 details.</simpara>\r
233 </listitem>\r
234 </varlistentry>\r
235 <varlistentry>\r
236 <term>\r
237 branches\r
238 </term>\r
239 <listitem>\r
240 <simpara>\r
241         A slightly deprecated way to store shorthands to be used\r
242         to specify URL to <emphasis>git-fetch</emphasis>, <emphasis>git-pull</emphasis> and <emphasis>git-push</emphasis>\r
243         commands is to store a file in <literal>branches/&lt;name&gt;</literal> and\r
244         give <emphasis>name</emphasis> to these commands in place of <emphasis>repository</emphasis>\r
245         argument.\r
246 </simpara>\r
247 </listitem>\r
248 </varlistentry>\r
249 <varlistentry>\r
250 <term>\r
251 hooks\r
252 </term>\r
253 <listitem>\r
254 <simpara>\r
255         Hooks are customization scripts used by various git\r
256         commands.  A handful of sample hooks are installed when\r
257         <emphasis>git-init</emphasis> is run, but all of them are disabled by\r
258         default.  To enable, the <literal>.sample</literal> suffix has to be\r
259         removed from the filename by renaming.\r
260         Read <xref linkend="githooks(5)"/> for more details about\r
261         each hook.\r
262 </simpara>\r
263 </listitem>\r
264 </varlistentry>\r
265 <varlistentry>\r
266 <term>\r
267 index\r
268 </term>\r
269 <listitem>\r
270 <simpara>\r
271         The current index file for the repository.  It is\r
272         usually not found in a bare repository.\r
273 </simpara>\r
274 </listitem>\r
275 </varlistentry>\r
276 <varlistentry>\r
277 <term>\r
278 info\r
279 </term>\r
280 <listitem>\r
281 <simpara>\r
282         Additional information about the repository is recorded\r
283         in this directory.\r
284 </simpara>\r
285 </listitem>\r
286 </varlistentry>\r
287 <varlistentry>\r
288 <term>\r
289 info/refs\r
290 </term>\r
291 <listitem>\r
292 <simpara>\r
293         This file helps dumb transports discover what refs are\r
294         available in this repository.  If the repository is\r
295         published for dumb transports, this file should be\r
296         regenerated by <emphasis>git-update-server-info</emphasis> every time a tag\r
297         or branch is created or modified.  This is normally done\r
298         from the <literal>hooks/update</literal> hook, which is run by the\r
299         <emphasis>git-receive-pack</emphasis> command when you <emphasis>git-push</emphasis> into the\r
300         repository.\r
301 </simpara>\r
302 </listitem>\r
303 </varlistentry>\r
304 <varlistentry>\r
305 <term>\r
306 info/grafts\r
307 </term>\r
308 <listitem>\r
309 <simpara>\r
310         This file records fake commit ancestry information, to\r
311         pretend the set of parents a commit has is different\r
312         from how the commit was actually created.  One record\r
313         per line describes a commit and its fake parents by\r
314         listing their 40-byte hexadecimal object names separated\r
315         by a space and terminated by a newline.\r
316 </simpara>\r
317 </listitem>\r
318 </varlistentry>\r
319 <varlistentry>\r
320 <term>\r
321 info/exclude\r
322 </term>\r
323 <listitem>\r
324 <simpara>\r
325         This file, by convention among Porcelains, stores the\r
326         exclude pattern list. <literal>.gitignore</literal> is the per-directory\r
327         ignore file.  <emphasis>git-status</emphasis>, <emphasis>git-add</emphasis>, <emphasis>git-rm</emphasis> and\r
328         <emphasis>git-clean</emphasis> look at it but the core git commands do not look\r
329         at it.  See also: <xref linkend="gitignore(5)"/>.\r
330 </simpara>\r
331 </listitem>\r
332 </varlistentry>\r
333 <varlistentry>\r
334 <term>\r
335 remotes\r
336 </term>\r
337 <listitem>\r
338 <simpara>\r
339         Stores shorthands to be used to give URL and default\r
340         refnames to interact with remote repository to\r
341         <emphasis>git-fetch</emphasis>, <emphasis>git-pull</emphasis> and <emphasis>git-push</emphasis> commands.\r
342 </simpara>\r
343 </listitem>\r
344 </varlistentry>\r
345 <varlistentry>\r
346 <term>\r
347 logs\r
348 </term>\r
349 <listitem>\r
350 <simpara>\r
351         Records of changes made to refs are stored in this\r
352         directory.  See <xref linkend="git-update-ref(1)"/>\r
353         for more information.\r
354 </simpara>\r
355 </listitem>\r
356 </varlistentry>\r
357 <varlistentry>\r
358 <term>\r
359 logs/refs/heads/<literal>name</literal>\r
360 </term>\r
361 <listitem>\r
362 <simpara>\r
363         Records all changes made to the branch tip named <literal>name</literal>.\r
364 </simpara>\r
365 </listitem>\r
366 </varlistentry>\r
367 <varlistentry>\r
368 <term>\r
369 logs/refs/tags/<literal>name</literal>\r
370 </term>\r
371 <listitem>\r
372 <simpara>\r
373         Records all changes made to the tag named <literal>name</literal>.\r
374 </simpara>\r
375 </listitem>\r
376 </varlistentry>\r
377 <varlistentry>\r
378 <term>\r
379 shallow\r
380 </term>\r
381 <listitem>\r
382 <simpara>\r
383         This is similar to <literal>info/grafts</literal> but is internally used\r
384         and maintained by shallow clone mechanism.  See <literal>--depth</literal>\r
385         option to <xref linkend="git-clone(1)"/> and <xref linkend="git-fetch(1)"/>.\r
386 </simpara>\r
387 </listitem>\r
388 </varlistentry>\r
389 </variablelist>\r
390 </simplesect>\r
391 <simplesect id="_see_also">\r
392 <title>SEE ALSO</title>\r
393 <simpara><xref linkend="git-init(1)"/>,\r
394 <xref linkend="git-clone(1)"/>,\r
395 <xref linkend="git-fetch(1)"/>,\r
396 <xref linkend="git-pack-refs(1)"/>,\r
397 <xref linkend="git-gc(1)"/>,\r
398 <xref linkend="git-checkout(1)"/>,\r
399 <xref linkend="gitglossary(7)"/>,\r
400 <ulink url="user-manual.html">The Git User&#8217;s Manual</ulink></simpara>\r
401 </simplesect>\r
402 <simplesect id="_git">\r
403 <title>GIT</title>\r
404 <simpara>Part of the <xref linkend="git(1)"/> suite.</simpara>\r
405 </simplesect>\r
406 </article>\r