source: general/prog/git.xml@ 42ddc30

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 42ddc30 was cb594b6c, checked in by Xi Ruoyao <xry111@…>, 12 months ago

general: Remove non-exist User Notes link

Part of User Notes removal by
https://www.linuxfromscratch.org/~xry111/remove-nonexist-usernote.sh

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