source: general/prog/git.xml@ 572553b

10.0 10.1 11.0 11.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind lazarus perl-modules qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since 572553b was 572553b, checked in by Pierre Labastie <pieere@…>, 5 years ago

role="runtime|nodep" in general

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19231 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 15.5 KB
Line 
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 "&kernel-dl;/software/scm/git" >
8
9 <!ENTITY git-download-http "&git-root;/git-&git-version;.tar.xz">
10 <!ENTITY git-download-ftp " ">
11 <!ENTITY git-md5sum "a55bc6a2164d3ef1c3e5fc2f0c1d0d52">
12 <!ENTITY git-size "4.6 MB">
13 <!-- space measured on 2.14.0 with gcc-7.1, glibc-2.25+git, all deps except dblatex.
14 The build gets up to 529MB (527 in 2.14.1), but the separate docs add 15 MB -->
15 <!ENTITY git-buildsize "542 MB (with optional dependencies and documentation, add 24MB if building the docs)">
16 <!ENTITY git-time "0.3 SBU (with parallelism=4, add 2.1 SBU if building documentation, add 1.4 SBU for tests with parallelism=4)">
17]>
18
19<sect1 id="git" xreflabel="git-&git-version;">
20 <?dbhtml filename="git.html"?>
21
22 <sect1info>
23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
25 </sect1info>
26
27 <title>Git-&git-version;</title>
28
29 <indexterm zone="git">
30 <primary sortas="a-Git">Git</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Git</title>
35
36 <para>
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 </para>
50
51 &lfs81_checked;
52
53 <bridgehead renderas="sect3">Package Information</bridgehead>
54 <itemizedlist spacing="compact">
55 <listitem>
56 <para>
57 Download (HTTP): <ulink url="&git-download-http;"/>
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download (FTP): <ulink url="&git-download-ftp;"/>
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Download MD5 sum: &git-md5sum;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Download size: &git-size;
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 Estimated disk space required: &git-buildsize;
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Estimated build time: &git-time;
83 </para>
84 </listitem>
85 </itemizedlist>
86
87 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
88 <itemizedlist spacing="compact">
89 <listitem>
90 <para>
91 <ulink url="&git-root;/git-manpages-&git-version;.tar.xz">
92 &git-root;/git-manpages-&git-version;.tar.xz</ulink>
93 (not needed if you've installed <xref linkend="asciidoc"/>,
94 <xref linkend="xmlto"/>, and prefer to rebuild them)
95 </para>
96 </listitem>
97 <listitem>
98 <para>
99 <ulink url="&git-root;/git-htmldocs-&git-version;.tar.xz">
100 &git-root;/git-htmldocs-&git-version;.tar.xz</ulink>
101 and other docs (not needed if you've installed
102 <xref linkend="asciidoc"/> and want to rebuild the documentation).
103 </para>
104 </listitem>
105 </itemizedlist>
106
107 <bridgehead renderas="sect3">Git Dependencies</bridgehead>
108
109 <bridgehead renderas="sect4">Recommended</bridgehead>
110 <para role="recommended">
111 <xref linkend="curl"/> (needed to use <application>Git</application> over http,
112 https, ftp or ftps),
113 <xref linkend="openssl"/>,
114 <xref linkend="perl-error"/>, and
115 <xref linkend="python2"/>
116 </para>
117
118 <bridgehead renderas="sect4">Optional</bridgehead>
119 <para role="optional">
120 <xref linkend="pcre2"/> (<emphasis>or</emphasis> the deprecated <xref
121 linkend="pcre"/>), in either case configured with
122 <literal>--enable-jit</literal>,
123 <xref linkend="subversion"/> with Perl bindings (for <command>git svn</command>),
124 <xref role="runtime" linkend="tk"/>
125 (gitk, a simple <application>Git</application>
126 repository viewer, uses <application>Tk</application> at runtime), and
127 <xref linkend="valgrind"/>
128 </para>
129
130 <bridgehead renderas="sect4">Optional (to create the man pages, html docs
131 and other docs)</bridgehead>
132 <para role="optional">
133 <xref linkend="xmlto"/> and
134 <xref linkend="asciidoc"/> or
135 <ulink url="http://asciidoctor.org/">AsciiDoctor</ulink>, and also
136 <ulink url="http://dblatex.sourceforge.net/">dblatex</ulink>
137 (for the PDF version of the user manual), and
138 <ulink url="http://docbook2x.sourceforge.net/">docbook2x</ulink> to
139 create info pages
140 </para>
141
142 <para condition="html" role="usernotes">User Notes:
143 <ulink url="&blfs-wiki;/git"/>
144 </para>
145 </sect2>
146
147 <sect2 role="installation">
148 <title>Installation of Git</title>
149
150 <para>
151 Install <application>Git</application> by running the following
152 commands:
153 </para>
154
155<screen><userinput>./configure --prefix=/usr --with-gitconfig=/etc/gitconfig &amp;&amp;
156make</userinput></screen>
157
158 <para>
159 You can build the man pages and/or html docs, or
160 use downloaded ones. If you choose to build them, use next two following
161 instructions.
162 </para>
163
164 <para>
165 If you have installed <xref linkend="asciidoc"/> you can
166 create the html version of the man pages and other docs:
167 </para>
168
169<screen><userinput>make html</userinput></screen>
170
171 <para>
172 If you have installed <xref linkend="asciidoc"/> and
173 <xref linkend="xmlto"/> you can create the man pages:
174 </para>
175
176<screen><userinput>make man</userinput></screen>
177
178 <para>
179 The test suite can be run in parallel mode. To run the test suite, issue:
180 <command>make test</command>. If run as a normal user, 0 tests should be
181 reported as failed in the final summary.
182 </para>
183
184 <para>
185 Now, as the <systemitem class="username">root</systemitem>
186 user:
187 </para>
188
189<screen role="root"><userinput>make install</userinput></screen>
190
191<!-- ==== Method 1 for docs ====== -->
192 <bridgehead renderas="sect3">If you created the man pages and/or html docs</bridgehead>
193
194 <para>
195 Install the man pages as
196 <systemitem class="username">root</systemitem> user:
197 </para>
198
199<screen role="root"><userinput>make install-man</userinput></screen>
200
201 <para>
202 Install the html docs as
203 <systemitem class="username">root</systemitem> user:
204 </para>
205
206<screen role="root"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html</userinput></screen>
207
208<!-- ==== Method 2 for docs ====== -->
209 <bridgehead renderas="sect3">If you downloaded the man pages and/or html docs</bridgehead>
210
211 <para>
212 If you downloaded the man pages untar them as the
213 <systemitem class="username">root</systemitem> user:
214 </para>
215
216<screen role="root"><userinput>tar -xf ../git-manpages-&git-version;.tar.xz \
217 -C /usr/share/man --no-same-owner --no-overwrite-dir</userinput></screen>
218
219 <para>
220 If you downloaded the html docs untar them as the
221 <systemitem class="username">root</systemitem> user:
222 </para>
223
224<screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version; &amp;&amp;
225tar -xf ../git-htmldocs-&git-version;.tar.xz \
226 -C /usr/share/doc/git-&git-version; --no-same-owner --no-overwrite-dir &amp;&amp;
227
228find /usr/share/doc/git-&git-version; -type d -exec chmod 755 {} \; &amp;&amp;
229find /usr/share/doc/git-&git-version; -type f -exec chmod 644 {} \;</userinput></screen>
230
231<!-- ==== Reorganize docs ====== -->
232 <bridgehead renderas="sect3">Reorganize text and html in the html-docs (both methods)</bridgehead>
233
234 <para>
235 For both methods, the html-docs include a lot of plain text files.
236 Reorganize the files as the
237 <systemitem class="username">root</systemitem> user:
238 </para>
239
240<screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version;/man-pages/{html,text} &amp;&amp;
241mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &amp;&amp;
242mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &amp;&amp;
243
244mkdir -vp /usr/share/doc/git-&git-version;/technical/{html,text} &amp;&amp;
245mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &amp;&amp;
246mv /usr/share/doc/git-&git-version;/technical/{*.,}html &amp;&amp;
247
248mkdir -vp /usr/share/doc/git-&git-version;/howto/{html,text} &amp;&amp;
249mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &amp;&amp;
250mv /usr/share/doc/git-&git-version;/howto/{*.,}html &amp;&amp;
251
252sed -i '/^&lt;a href=/s|howto/|&amp;html/|' /usr/share/doc/git-&git-version;/howto-index.html &amp;&amp;
253sed -i '/^\* link:/s|howto/|&amp;html/|' /usr/share/doc/git-&git-version;/howto-index.txt</userinput></screen>
254
255 </sect2>
256
257 <sect2 role="commands">
258 <title>Command Explanations</title>
259
260 <para>
261 <parameter>--with-gitconfig=/etc/gitconfig</parameter>: This sets
262 <filename>/etc/gitconfig</filename> as the file that stores
263 the default, system wide, <application>Git</application>
264 settings.
265 </para>
266
267 <para>
268 <option>--without-python</option>: Use this switch if
269 <application>Python</application> is not installed.
270 </para>
271
272 <para>
273 <option>--with-libpcre2</option>: Use this switch if
274 <application>PCRE2</application> is installed and has been built with
275 the non-default JIT enabled.
276 </para>
277
278 <para>
279 <option>--with-libpcre2</option>: As an alternative to PCRE2, use this
280 switch if the deprecated <application>PCRE</application> is installed
281 and has been built with the non-default JIT enabled.
282 </para>
283
284 <para>
285 <command>tar -xf ../git-manpages-&git-version;.tar.gz -C
286 /usr/share/man --no-same-owner</command>: This untars
287 <filename>git-manpages-&git-version;.tar.gz</filename>. The
288 <option>-C</option> option makes tar change directory to
289 <filename class="directory">/usr/share/man</filename> before
290 it starts to decompress the docs. The <option>--no-same-owner</option>
291 option stops tar from preserving the user and group details of the
292 files. This is useful as that user or group may not exist on your
293 system; this could (potentially) be a security risk.
294 </para>
295
296 <para>
297 <command>mv /usr/share/doc/git-&git-version; ...</command>: These
298 commands move some of the files into subfolders to make it easier to sort
299 through the docs and find what you're looking for.
300 </para>
301
302 <para>
303 <command>find ... chmod ...</command>: These commands correct the
304 permissions in the shipped documentation tar file.
305 </para>
306
307 </sect2>
308
309 <sect2 role="configuration">
310 <title>Configuring Git</title>
311
312 <sect3 id="git-config">
313 <title>Config Files</title>
314 <para>
315 <filename>~/.gitconfig</filename> and
316 <filename>/etc/gitconfig</filename>
317 </para>
318
319 <indexterm zone="git git-config">
320 <primary sortas="e-AA.gitconfig">~/.gitconfig</primary>
321 </indexterm>
322
323 <indexterm zone="git git-config">
324 <primary sortas="e-etc-gitconfig">/etc/gitconfig</primary>
325 </indexterm>
326
327 </sect3>
328
329 </sect2>
330
331 <sect2 role="content">
332 <title>Contents</title>
333
334 <segmentedlist>
335 <segtitle>Installed Programs</segtitle>
336 <segtitle>Installed Libraries</segtitle>
337 <segtitle>Installed Directories</segtitle>
338
339 <seglistitem>
340 <seg>
341 git, git-receive-pack and git-upload-archive (hardlinked to each
342 other), git-cvsserver, git-shell, git-upload-pack, and gitk
343 </seg>
344 <seg>
345 None
346 </seg>
347 <seg>
348 /usr/lib/perl5/site_perl/&lt;5.x.y&gt;{,&lt;arch&gt;-linux/auto}/Git,
349 /usr/libexec/git-core and
350 /usr/share/{doc/git-&git-version;,git-core,git-gui,gitk,gitweb}
351 </seg>
352 </seglistitem>
353 </segmentedlist>
354
355 <variablelist>
356 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
357 <?dbfo list-presentation="list"?>
358 <?dbhtml list-presentation="table"?>
359
360 <varlistentry id="git-prog">
361 <term><command>git</command></term>
362 <listitem>
363 <para>
364 is the stupid content tracker.
365 </para>
366 <indexterm zone="git git-prog">
367 <primary sortas="b-git">git</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="git-cvsserver">
373 <term><command>git-cvsserver</command></term>
374 <listitem>
375 <para>
376 is a CVS server emulator for <application>Git</application>.
377 </para>
378 <indexterm zone="git git-cvsserver">
379 <primary sortas="b-git-cvsserver">git-cvsserver</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="gitk">
385 <term><command>gitk</command></term>
386 <listitem>
387 <para>
388 is a graphical <application>Git</application> repository browser
389 (needs <xref linkend="tk"/>).
390 </para>
391 <indexterm zone="git gitk">
392 <primary sortas="b-gitk">gitk</primary>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="git-receive-pack">
398 <term><command>git-receive-pack</command></term>
399 <listitem>
400 <para>
401 is invoked by <command>git send-pack</command> and updates the
402 repository with the information fed from the remote end.
403 </para>
404 <indexterm zone="git git-receive-pack">
405 <primary sortas="b-git-receive-pack">git-receive-pack</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="git-shell">
411 <term><command>git-shell</command></term>
412 <listitem>
413 <para>
414 is a login shell for SSH accounts to provide restricted Git
415 access.
416 </para>
417 <indexterm zone="git git-shell">
418 <primary sortas="b-git-shell">git-shell</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="git-upload-archive">
424 <term><command>git-upload-archive</command></term>
425 <listitem>
426 <para>
427 is invoked by <command>git archive --remote</command> and sends
428 a generated archive to the other end over the git protocol.
429 </para>
430 <indexterm zone="git git-upload-archive">
431 <primary sortas="b-git-upload-archive">git-upload-archive</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="git-upload-pack">
437 <term><command>git-upload-pack</command></term>
438 <listitem>
439 <para>
440 is invoked by <command>git fetch-pack</command>, it discovers
441 what objects the other side is missing, and sends them after
442 packing.
443 </para>
444 <indexterm zone="git git-upload-pack">
445 <primary sortas="b-git-upload-pack">git-upload-pack</primary>
446 </indexterm>
447 </listitem>
448 </varlistentry>
449
450 </variablelist>
451
452 </sect2>
453
454</sect1>
Note: See TracBrowser for help on using the repository browser.