source: general/prog/git.xml@ 765916f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt 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 765916f was 765916f, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Fix the test suite in libxcb, and tag git

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

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