source: general/prog/git.xml@ 195f473c

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 195f473c was 195f473c, checked in by Tim Tassonis <stuff@…>, 3 years ago

Update to git-2.31.1.

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

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