1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY git-root "https://www.kernel.org/pub/software/scm/git" >
|
---|
8 |
|
---|
9 | <!ENTITY git-download-http "&git-root;/git-&git-version;.tar.xz">
|
---|
10 | <!ENTITY git-download-ftp "ftp://ftp.kernel.org/pub/software/scm/git/git-&git-version;.tar.xz">
|
---|
11 | <!ENTITY git-md5sum "eece7b1e87983271621a0cb6aab37a25">
|
---|
12 | <!ENTITY git-size "3.8 MB">
|
---|
13 | <!ENTITY git-buildsize "364 MB (including the pre-built documentation)">
|
---|
14 | <!ENTITY git-time "0.8 SBU (add 2.4 SBU for building documentation)">
|
---|
15 | <!-- tests used to take 12 SBU, grep-2.23 causes them to fail after 4.0 SBU -->
|
---|
16 | ]>
|
---|
17 |
|
---|
18 | <sect1 id="git" xreflabel="git-&git-version;">
|
---|
19 | <?dbhtml filename="git.html"?>
|
---|
20 |
|
---|
21 | <sect1info>
|
---|
22 | <othername>$LastChangedBy$</othername>
|
---|
23 | <date>$Date$</date>
|
---|
24 | </sect1info>
|
---|
25 |
|
---|
26 | <title>Git-&git-version;</title>
|
---|
27 |
|
---|
28 | <indexterm zone="git">
|
---|
29 | <primary sortas="a-Git">Git</primary>
|
---|
30 | </indexterm>
|
---|
31 |
|
---|
32 | <sect2 role="package">
|
---|
33 | <title>Introduction to Git</title>
|
---|
34 |
|
---|
35 | <para>
|
---|
36 |
|
---|
37 | <application>Git</application> is a free and open source, distributed
|
---|
38 | version control system designed to handle everything from small to very
|
---|
39 | large projects with speed and efficiency. Every
|
---|
40 | <application>Git</application> clone is a full-fledged repository with
|
---|
41 | complete history and full revision tracking capabilities, not dependent
|
---|
42 | on network access or a central server. Branching and merging are fast and
|
---|
43 | easy to do. <application>Git</application> is used for version control of
|
---|
44 | files, much like tools such as <xref linkend="mercurial"/>,
|
---|
45 | <application>Bazaar</application>, <xref linkend="subversion"/>,
|
---|
46 | <ulink url="http://www.nongnu.org/cvs/">CVS</ulink>,
|
---|
47 | <application>Perforce</application>, and
|
---|
48 | <application>Team Foundation Server</application>.
|
---|
49 |
|
---|
50 | </para>
|
---|
51 |
|
---|
52 | &lfs78_checked;
|
---|
53 |
|
---|
54 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
55 | <itemizedlist spacing="compact">
|
---|
56 | <listitem>
|
---|
57 | <para>
|
---|
58 | Download (HTTP): <ulink url="&git-download-http;"/>
|
---|
59 | </para>
|
---|
60 | </listitem>
|
---|
61 | <listitem>
|
---|
62 | <para>
|
---|
63 | Download (FTP): <ulink url="&git-download-ftp;"/>
|
---|
64 | </para>
|
---|
65 | </listitem>
|
---|
66 | <listitem>
|
---|
67 | <para>
|
---|
68 | Download MD5 sum: &git-md5sum;
|
---|
69 | </para>
|
---|
70 | </listitem>
|
---|
71 | <listitem>
|
---|
72 | <para>
|
---|
73 | Download size: &git-size;
|
---|
74 | </para>
|
---|
75 | </listitem>
|
---|
76 | <listitem>
|
---|
77 | <para>
|
---|
78 | Estimated disk space required: &git-buildsize;
|
---|
79 | </para>
|
---|
80 | </listitem>
|
---|
81 | <listitem>
|
---|
82 | <para>
|
---|
83 | Estimated build time: &git-time;
|
---|
84 | </para>
|
---|
85 | </listitem>
|
---|
86 | </itemizedlist>
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
89 | <itemizedlist spacing="compact">
|
---|
90 | <listitem>
|
---|
91 | <para>
|
---|
92 | <ulink url="&git-root;/git-manpages-&git-version;.tar.xz">
|
---|
93 | &git-root;/git-manpages-&git-version;.tar.xz</ulink>
|
---|
94 | (if you prefer the original, not needed if you've installed asciidoc
|
---|
95 | and xmlto and prefer to build them).
|
---|
96 | </para>
|
---|
97 | </listitem>
|
---|
98 | <listitem>
|
---|
99 | <para>
|
---|
100 | <ulink url="&git-root;/git-htmldocs-&git-version;.tar.xz">
|
---|
101 | &git-root;/git-htmldocs-&git-version;.tar.xz</ulink>
|
---|
102 | and other docs (if you prefer the original, not needed if you've
|
---|
103 | installed asciidoc and prefer to build them).
|
---|
104 | </para>
|
---|
105 | </listitem>
|
---|
106 | </itemizedlist>
|
---|
107 |
|
---|
108 | <bridgehead renderas="sect3">Git Dependencies</bridgehead>
|
---|
109 |
|
---|
110 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
111 | <para role="recommended">
|
---|
112 | <xref linkend="curl"/> (needed to use <application>Git</application> over http,
|
---|
113 | https, ftp or ftps),
|
---|
114 | <xref linkend="openssl"/>, and
|
---|
115 | <xref linkend="python2"/>
|
---|
116 | </para>
|
---|
117 |
|
---|
118 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
119 | <para role="optional">
|
---|
120 | <xref linkend="pcre"/>,
|
---|
121 | <xref linkend="subversion"/> with Perl bindings (for <command>git svn</command>),
|
---|
122 | <xref linkend="tk"/> (gitk, a simple <application>Git</application>
|
---|
123 | repository viewer, uses <application>Tk</application> at runtime), and
|
---|
124 | <xref linkend="valgrind"/>
|
---|
125 | </para>
|
---|
126 |
|
---|
127 | <bridgehead renderas="sect4">Optional (to create the man pages and html docs)</bridgehead>
|
---|
128 | <para>
|
---|
129 | <xref linkend="xmlto"/> and
|
---|
130 | <ulink url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> or
|
---|
131 | <ulink url="http://asciidoctor.org/">AsciiDoctor</ulink>
|
---|
132 | </para>
|
---|
133 |
|
---|
134 | <para condition="html" role="usernotes">User Notes:
|
---|
135 | <ulink url="&blfs-wiki;/git"/>
|
---|
136 | </para>
|
---|
137 | </sect2>
|
---|
138 |
|
---|
139 | <sect2 role="installation">
|
---|
140 | <title>Installation of Git</title>
|
---|
141 |
|
---|
142 | <para>
|
---|
143 | Install <application>Git</application> by running the following
|
---|
144 | commands:
|
---|
145 | </para>
|
---|
146 |
|
---|
147 | <screen><userinput>./configure --prefix=/usr --with-gitconfig=/etc/gitconfig &&
|
---|
148 | make</userinput></screen>
|
---|
149 |
|
---|
150 | <para>
|
---|
151 | You can build the man pages and/or html docs, or
|
---|
152 | use downloaded ones. If you choose to build them, use next two following
|
---|
153 | instructions.
|
---|
154 | </para>
|
---|
155 |
|
---|
156 | <para>
|
---|
157 | If you have installed <ulink
|
---|
158 | url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> you can
|
---|
159 | create the html version of the man pages and other docs:
|
---|
160 | </para>
|
---|
161 |
|
---|
162 | <screen><userinput>make html</userinput></screen>
|
---|
163 |
|
---|
164 | <para>
|
---|
165 | If you have installed <ulink
|
---|
166 | url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> and
|
---|
167 | <xref linkend="xmlto"/> you can create the man pages:
|
---|
168 | </para>
|
---|
169 |
|
---|
170 | <screen><userinput>make man</userinput></screen>
|
---|
171 |
|
---|
172 | <para>
|
---|
173 | <!-- The test suite can be run in parallel mode. To run the test suite, issue: -->
|
---|
174 | The test suite fails early, in 'blame respects encoding', because grep-2.23
|
---|
175 | treats data in the locale tests as binary. To run the tests up to that
|
---|
176 | point issue:
|
---|
177 | <command>make test</command>. -->
|
---|
178 | </para>
|
---|
179 |
|
---|
180 | <para>
|
---|
181 | Now, as the <systemitem class="username">root</systemitem>
|
---|
182 | user:
|
---|
183 | </para>
|
---|
184 |
|
---|
185 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
186 |
|
---|
187 | <!-- ==== Method 1 for docs ====== -->
|
---|
188 | <bridgehead renderas="sect3">If you created the man pages and/or html docs</bridgehead>
|
---|
189 |
|
---|
190 | <para>
|
---|
191 | Install the man pages as
|
---|
192 | <systemitem class="username">root</systemitem> user:
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <screen role="root"><userinput>make install-man</userinput></screen>
|
---|
196 |
|
---|
197 | <para>
|
---|
198 | Install the html docs as
|
---|
199 | <systemitem class="username">root</systemitem> user:
|
---|
200 | </para>
|
---|
201 |
|
---|
202 | <screen role="root"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html</userinput></screen>
|
---|
203 |
|
---|
204 | <!-- ==== Method 2 for docs ====== -->
|
---|
205 | <bridgehead renderas="sect3">If you downloaded the man pages and/or html docs</bridgehead>
|
---|
206 |
|
---|
207 | <para>
|
---|
208 | If you downloaded the man pages untar them as the
|
---|
209 | <systemitem class="username">root</systemitem> user:
|
---|
210 | </para>
|
---|
211 |
|
---|
212 | <screen role="root"><userinput>tar -xf ../git-manpages-&git-version;.tar.xz \
|
---|
213 | -C /usr/share/man --no-same-owner --no-overwrite-dir</userinput></screen>
|
---|
214 |
|
---|
215 | <para>
|
---|
216 | If you downloaded the html docs untar them as the
|
---|
217 | <systemitem class="username">root</systemitem> user:
|
---|
218 | </para>
|
---|
219 |
|
---|
220 | <screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version; &&
|
---|
221 | tar -xf ../git-htmldocs-&git-version;.tar.xz \
|
---|
222 | -C /usr/share/doc/git-&git-version; --no-same-owner --no-overwrite-dir &&
|
---|
223 |
|
---|
224 | find /usr/share/doc/git-&git-version; -type d -exec chmod 755 {} \; &&
|
---|
225 | find /usr/share/doc/git-&git-version; -type f -exec chmod 644 {} \;</userinput></screen>
|
---|
226 |
|
---|
227 | <!-- ==== Reorganize docs ====== -->
|
---|
228 | <bridgehead renderas="sect3">Reorganize man pages and/or html docs (both methods)</bridgehead>
|
---|
229 |
|
---|
230 | <para>
|
---|
231 | For both methods, reorganize the files, as
|
---|
232 | <systemitem class="username">root</systemitem> user:
|
---|
233 | </para>
|
---|
234 |
|
---|
235 | <screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version;/man-pages/{html,text} &&
|
---|
236 | mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &&
|
---|
237 | mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &&
|
---|
238 |
|
---|
239 | mkdir -vp /usr/share/doc/git-&git-version;/technical/{html,text} &&
|
---|
240 | mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &&
|
---|
241 | mv /usr/share/doc/git-&git-version;/technical/{*.,}html &&
|
---|
242 |
|
---|
243 | mkdir -vp /usr/share/doc/git-&git-version;/howto/{html,text} &&
|
---|
244 | mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &&
|
---|
245 | mv /usr/share/doc/git-&git-version;/howto/{*.,}html</userinput></screen>
|
---|
246 |
|
---|
247 | </sect2>
|
---|
248 |
|
---|
249 | <sect2 role="commands">
|
---|
250 | <title>Command Explanations</title>
|
---|
251 |
|
---|
252 | <para>
|
---|
253 | <parameter>--with-gitconfig=/etc/gitconfig</parameter>: This sets
|
---|
254 | <filename>/etc/gitconfig</filename> as the file that stores
|
---|
255 | the default, system wide, <application>Git</application>
|
---|
256 | settings.
|
---|
257 | </para>
|
---|
258 |
|
---|
259 | <para>
|
---|
260 | <option>--without-python</option>: Use this switch if
|
---|
261 | <application>Python</application> is not installed.
|
---|
262 | </para>
|
---|
263 |
|
---|
264 | <para>
|
---|
265 | <option>--with-libpcre</option>: Use this switch if
|
---|
266 | <application>PCRE</application> is installed.
|
---|
267 | </para>
|
---|
268 |
|
---|
269 | <para>
|
---|
270 | <command>tar -xf ../git-manpages-&git-version;.tar.gz -C
|
---|
271 | /usr/share/man --no-same-owner</command>: This untars
|
---|
272 | <filename>git-manpages-&git-version;.tar.gz</filename>. The
|
---|
273 | <option>-C</option> option makes tar change directory to
|
---|
274 | <filename class="directory">/usr/share/man</filename> before
|
---|
275 | it starts to decompress the docs. The <option>--no-same-owner</option>
|
---|
276 | option stops tar from preserving the user and group details of the
|
---|
277 | files. This is useful as that user or group may not exist on your
|
---|
278 | system; this could (potentially) be a security risk.
|
---|
279 | </para>
|
---|
280 |
|
---|
281 | <para>
|
---|
282 | <command>mv /usr/share/doc/git-&git-version; ...</command>: These
|
---|
283 | commands move some of the files into subfolders to make it easier to sort
|
---|
284 | through the docs and find what you're looking for.
|
---|
285 | </para>
|
---|
286 |
|
---|
287 | <para>
|
---|
288 | <command>find ... chmod ...</command>: These commands correct the
|
---|
289 | permissions in the shipped documentation tar file.
|
---|
290 | </para>
|
---|
291 |
|
---|
292 | </sect2>
|
---|
293 |
|
---|
294 | <sect2 role="configuration">
|
---|
295 | <title>Configuring Git</title>
|
---|
296 |
|
---|
297 | <sect3 id="git-config">
|
---|
298 | <title>Config Files</title>
|
---|
299 | <para>
|
---|
300 | <filename>~/.gitconfig</filename> and
|
---|
301 | <filename>/etc/gitconfig</filename>
|
---|
302 | </para>
|
---|
303 |
|
---|
304 | <indexterm zone="git git-config">
|
---|
305 | <primary sortas="e-AA.gitconfig">~/.gitconfig</primary>
|
---|
306 | </indexterm>
|
---|
307 |
|
---|
308 | <indexterm zone="git git-config">
|
---|
309 | <primary sortas="e-etc-gitconfig">/etc/gitconfig</primary>
|
---|
310 | </indexterm>
|
---|
311 |
|
---|
312 | </sect3>
|
---|
313 |
|
---|
314 | </sect2>
|
---|
315 |
|
---|
316 | <sect2 role="content">
|
---|
317 | <title>Contents</title>
|
---|
318 |
|
---|
319 | <segmentedlist>
|
---|
320 | <segtitle>Installed Programs</segtitle>
|
---|
321 | <segtitle>Installed Libraries</segtitle>
|
---|
322 | <segtitle>Installed Directories</segtitle>
|
---|
323 |
|
---|
324 | <seglistitem>
|
---|
325 | <seg>
|
---|
326 | git, git-receive-pack and git-upload-archive (hardlinked to each other),
|
---|
327 | git-cvsserver, git-shell, git-upload-pack, and gitk
|
---|
328 | </seg>
|
---|
329 | <seg>
|
---|
330 | None
|
---|
331 | </seg>
|
---|
332 | <seg>
|
---|
333 | /usr/lib/perl5/site_perl/<5.x.y>{,<arch>-linux/auto}/Git,
|
---|
334 | /usr/libexec/git-core and
|
---|
335 | /usr/share/{doc/git-&git-version;,git-core,git-gui,gitk,gitweb}
|
---|
336 | </seg>
|
---|
337 | </seglistitem>
|
---|
338 | </segmentedlist>
|
---|
339 |
|
---|
340 | <variablelist>
|
---|
341 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
342 | <?dbfo list-presentation="list"?>
|
---|
343 | <?dbhtml list-presentation="table"?>
|
---|
344 |
|
---|
345 | <varlistentry id="git-prog">
|
---|
346 | <term><command>git</command></term>
|
---|
347 | <listitem>
|
---|
348 | <para>
|
---|
349 | is the stupid content tracker.
|
---|
350 | </para>
|
---|
351 | <indexterm zone="git git-prog">
|
---|
352 | <primary sortas="b-git">git</primary>
|
---|
353 | </indexterm>
|
---|
354 | </listitem>
|
---|
355 | </varlistentry>
|
---|
356 |
|
---|
357 | <varlistentry id="git-cvsserver">
|
---|
358 | <term><command>git-cvsserver</command></term>
|
---|
359 | <listitem>
|
---|
360 | <para>
|
---|
361 | is a CVS server emulator for <application>Git</application>.
|
---|
362 | </para>
|
---|
363 | <indexterm zone="git git-cvsserver">
|
---|
364 | <primary sortas="b-git-cvsserver">git-cvsserver</primary>
|
---|
365 | </indexterm>
|
---|
366 | </listitem>
|
---|
367 | </varlistentry>
|
---|
368 |
|
---|
369 | <varlistentry id="gitk">
|
---|
370 | <term><command>gitk</command></term>
|
---|
371 | <listitem>
|
---|
372 | <para>
|
---|
373 | is a graphical <application>Git</application> repository browser
|
---|
374 | (needs <xref linkend="tk"/>).
|
---|
375 | </para>
|
---|
376 | <indexterm zone="git gitk">
|
---|
377 | <primary sortas="b-gitk">gitk</primary>
|
---|
378 | </indexterm>
|
---|
379 | </listitem>
|
---|
380 | </varlistentry>
|
---|
381 |
|
---|
382 | <varlistentry id="git-receive-pack">
|
---|
383 | <term><command>git-receive-pack</command></term>
|
---|
384 | <listitem>
|
---|
385 | <para>
|
---|
386 | is invoked by <command>git send-pack</command> and updates the
|
---|
387 | repository with the information fed from the remote end.
|
---|
388 | </para>
|
---|
389 | <indexterm zone="git git-receive-pack">
|
---|
390 | <primary sortas="b-git-receive-pack">git-receive-pack</primary>
|
---|
391 | </indexterm>
|
---|
392 | </listitem>
|
---|
393 | </varlistentry>
|
---|
394 |
|
---|
395 | <varlistentry id="git-shell">
|
---|
396 | <term><command>git-shell</command></term>
|
---|
397 | <listitem>
|
---|
398 | <para>
|
---|
399 | is a login shell for SSH accounts to provide restricted Git
|
---|
400 | access.
|
---|
401 | </para>
|
---|
402 | <indexterm zone="git git-shell">
|
---|
403 | <primary sortas="b-git-shell">git-shell</primary>
|
---|
404 | </indexterm>
|
---|
405 | </listitem>
|
---|
406 | </varlistentry>
|
---|
407 |
|
---|
408 | <varlistentry id="git-upload-archive">
|
---|
409 | <term><command>git-upload-archive</command></term>
|
---|
410 | <listitem>
|
---|
411 | <para>
|
---|
412 | is invoked by <command>git archive --remote</command> and sends
|
---|
413 | a generated archive to the other end over the git protocol.
|
---|
414 | </para>
|
---|
415 | <indexterm zone="git git-upload-archive">
|
---|
416 | <primary sortas="b-git-upload-archive">git-upload-archive</primary>
|
---|
417 | </indexterm>
|
---|
418 | </listitem>
|
---|
419 | </varlistentry>
|
---|
420 |
|
---|
421 | <varlistentry id="git-upload-pack">
|
---|
422 | <term><command>git-upload-pack</command></term>
|
---|
423 | <listitem>
|
---|
424 | <para>
|
---|
425 | is invoked by <command>git fetch-pack</command>, it discovers
|
---|
426 | what objects the other side is missing, and sends them after
|
---|
427 | packing.
|
---|
428 | </para>
|
---|
429 | <indexterm zone="git git-upload-pack">
|
---|
430 | <primary sortas="b-git-upload-pack">git-upload-pack</primary>
|
---|
431 | </indexterm>
|
---|
432 | </listitem>
|
---|
433 | </varlistentry>
|
---|
434 |
|
---|
435 | </variablelist>
|
---|
436 |
|
---|
437 | </sect2>
|
---|
438 |
|
---|
439 | </sect1>
|
---|