source: general/prog/git.xml@ 94b42903

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 94b42903 was 94b42903, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Archive openssl-1.1.x. Moved to LFS.
Update to v4l-utils-1.14.2.
Update to vlc-3.0.0.

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

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