source: general/prog/git.xml@ cb594b6c

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 cb594b6c was cb594b6c, checked in by Xi Ruoyao <xry111@…>, 11 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
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 "c1f58a12b891ad73927b8e4a3aa29c7b">
12
13 <!ENTITY git-size "11 MB">
14 <!-- but people keep forgetting that an install not only needs the net build
15 space, it also needs the install space (or DESTDIR) -->
16 <!ENTITY git-buildsize "252 MB (with downloaded documentation">
17 <!-- With 2.23.0, there was a large increase in time for tests. Possibly disk related? -->
18 <!-- Confirmed that it is disk related.-->
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)">
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">
29 <primary sortas="a-Git">Git</primary>
30 </indexterm>
31
32 <sect2 role="package">
33 <title>Introduction to Git</title>
34
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
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
43 files, much like tools such as <xref linkend="mercurial"/>,
44 <application>Bazaar</application>, <xref linkend="subversion"/>,
45 <ulink url="https://www.nongnu.org/cvs/">CVS</ulink>,
46 <application>Perforce</application>, and
47 <application>Team Foundation Server</application>.
48 </para>
49
50 &lfs113_checked;
51
52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
55 <para>
56 Download (HTTP): <ulink url="&git-download-http;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download (FTP): <ulink url="&git-download-ftp;"/>
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download MD5 sum: &git-md5sum;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download size: &git-size;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated disk space required: &git-buildsize;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Estimated build time: &git-time;
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
87 <itemizedlist spacing="compact">
88 <listitem>
89 <para>
90 <ulink url="&git-root;/git-manpages-&git-version;.tar.xz">
91 &git-root;/git-manpages-&git-version;.tar.xz</ulink>
92 (not needed if you've installed <xref linkend="asciidoc"/>,
93 <xref linkend="xmlto"/>, and prefer to rebuild them)
94 </para>
95 </listitem>
96 <listitem>
97 <para>
98 <ulink url="&git-root;/git-htmldocs-&git-version;.tar.xz">
99 &git-root;/git-htmldocs-&git-version;.tar.xz</ulink>
100 and other docs (not needed if you've installed
101 <xref linkend="asciidoc"/> and want to rebuild the documentation).
102 </para>
103 </listitem>
104 </itemizedlist>
105
106 <bridgehead renderas="sect3">Git Dependencies</bridgehead>
107
108 <bridgehead renderas="sect4">Recommended</bridgehead>
109 <para role="recommended">
110 <xref linkend="curl"/> (needed to use <application>Git</application> over
111 http, https, ftp or ftps)
112 </para>
113
114 <bridgehead renderas="sect4">Optional</bridgehead>
115 <para role="optional">
116 <xref linkend="apache"/> (for some tests),
117 <xref role="runtime" linkend="gnupg2"/> (runtime, may be used to sign
118 <application>Git</application> commits or tags, or verify the signatures
119 of them),
120 <xref role="runtime" linkend="openssh"/> (runtime, needed to use
121 <application>Git</application> over ssh),
122 <xref linkend="pcre2"/> (<emphasis>or</emphasis> the deprecated <xref
123 role="nodep" linkend="pcre"/>), in either case configured with
124 <literal>--enable-jit</literal>,
125 <xref role="runtime" linkend="subversion"/> with Perl bindings
126 (runtime, for <command>git svn</command>),
127 <xref role="runtime" linkend="tk"/>
128 (gitk, a simple <application>Git</application>
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>
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
136 SSL encryption)
137 </para>
138
139 <bridgehead renderas="sect4">Optional (to create the man pages, html docs
140 and other docs)</bridgehead>
141 <para role="optional">
142 <xref linkend="xmlto"/> and
143 <xref linkend="asciidoc"/>
144 <!-- or xref linkend="asciidoctor", doesn't work now because it needs docbook-xsl-ns -->,
145 and also
146 <ulink url="https://dblatex.sourceforge.net/">dblatex</ulink>
147 (for the PDF version of the user manual), and
148 <ulink url="https://docbook2x.sourceforge.net/">docbook2x</ulink> to
149 create info pages
150 </para>
151
152 </sect2>
153
154 <sect2 role="installation">
155 <title>Installation of Git</title>
156
157 <para>
158 Install <application>Git</application> by running the following
159 commands:
160 </para>
161
162<screen><userinput>./configure --prefix=/usr \
163 --with-gitconfig=/etc/gitconfig \
164 --with-python=python3 &amp;&amp;
165make</userinput></screen>
166
167 <para>
168 You can build the man pages and/or html docs, or
169 use downloaded ones. If you choose to build them, use the next two
170 instructions.
171 </para>
172
173 <para>
174 If you have installed <xref linkend="asciidoc"/> you can
175 create the html version of the man pages and other docs:
176 </para>
177
178<screen remap="doc"><userinput>make html</userinput></screen>
179
180 <para>
181 If you have installed <xref linkend="asciidoc"/> and
182 <xref linkend="xmlto"/> you can create the man pages:
183 </para>
184
185<screen remap="doc"><userinput>make man</userinput></screen>
186
187 <para>
188 The test suite can be run in parallel mode. To run the test suite, issue:
189 <command>make -k test</command>. <!--If run as a normal user, 0 tests
190 should be reported as failed in the final summary.-->
191 If <xref linkend="apache"/> is installed,
192 three tests in <filename>t5559-http-fetch-smart-http2.sh</filename> are
193 known to fail due to cURL-8.1.x.
194 </para>
195
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
202 <para>
203 Now, as the <systemitem class="username">root</systemitem>
204 user:
205 </para>
206
207<screen role="root"><userinput>make perllibdir=/usr/lib/perl5/&lfs-perl-version;/site_perl install</userinput></screen>
208
209<!-- ==== Method 1 for docs ====== -->
210 <bridgehead renderas="sect3">If you created the man pages and/or html docs</bridgehead>
211
212 <para>
213 Install the man pages as the
214 <systemitem class="username">root</systemitem> user:
215 </para>
216
217<screen role="root"
218 remap="doc"><userinput>make install-man</userinput></screen>
219
220 <para>
221 Install the html docs as the
222 <systemitem class="username">root</systemitem> user:
223 </para>
224
225<screen role="root"
226 remap="doc"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html</userinput></screen>
227
228<!-- ==== Method 2 for docs ====== -->
229 <bridgehead renderas="sect3">If you downloaded the man pages and/or html docs</bridgehead>
230
231 <para>
232 If you downloaded the man pages untar them as the
233 <systemitem class="username">root</systemitem> user:
234 </para>
235
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>
238
239 <para>
240 If you downloaded the html docs untar them as the
241 <systemitem class="username">root</systemitem> user:
242 </para>
243
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;
247
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>
250
251<!-- ==== Reorganize docs ====== -->
252 <bridgehead renderas="sect3">Reorganize text and html in the html-docs (both methods)</bridgehead>
253
254 <para>
255 For both methods, the html-docs include a lot of plain text files.
256 Reorganize the files as the
257 <systemitem class="username">root</systemitem> user:
258 </para>
259
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;
263
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;
270mv /usr/share/doc/git-&git-version;/howto/{*.,}html &amp;&amp;
271
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>
274
275 </sect2>
276
277 <sect2 role="commands">
278 <title>Command Explanations</title>
279
280 <para>
281 <parameter>--with-gitconfig=/etc/gitconfig</parameter>: This sets
282 <filename>/etc/gitconfig</filename> as the file that stores
283 the default, system wide, <application>Git</application>
284 settings.
285 </para>
286
287 <para>
288 <parameter>--with-python=python3</parameter>: Use this switch to use
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.
293 </para>
294
295 <para>
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>
302 <option>--with-libpcre1</option>: As an alternative to PCRE2, use this
303 switch if the deprecated <application>PCRE</application> is installed
304 and has been built with the non-default JIT enabled.
305 </para>
306
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>
318
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>
324
325 <para>
326 <command>find ... chmod ...</command>: These commands correct the
327 permissions in the shipped documentation tar file.
328 </para>
329
330 </sect2>
331
332 <sect2 role="configuration">
333 <title>Configuring Git</title>
334
335 <sect3 id="git-config">
336 <title>Config Files</title>
337 <para>
338 <filename>~/.gitconfig</filename> and
339 <filename>/etc/gitconfig</filename>
340 </para>
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>
349
350 </sect3>
351
352 </sect2>
353
354 <sect2 role="content">
355 <title>Contents</title>
356
357 <segmentedlist>
358 <segtitle>Installed Programs</segtitle>
359 <segtitle>Installed Libraries</segtitle>
360 <segtitle>Installed Directories</segtitle>
361
362 <seglistitem>
363 <seg>
364 git, git-receive-pack, git-upload-archive, and
365 git-upload-pack (hardlinked to each
366 other), git-cvsserver, git-shell, gitk, and scalar
367 </seg>
368 <seg>
369 None
370 </seg>
371 <seg>
372 /usr/libexec/git-core, and
373 /usr/share/{doc/git-&git-version;,git-core,git-gui,gitk,gitweb}
374 </seg>
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>
386 <para>
387 is the stupid content tracker
388 </para>
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>
398 <para>
399 is a CVS server emulator for <application>Git</application>
400 </para>
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>
410 <para>
411 is a graphical <application>Git</application> repository browser
412 (needs <xref linkend="tk"/>)
413 </para>
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>
423 <para>
424 is invoked by <command>git send-pack</command> and updates the
425 repository with the information fed from the remote end
426 </para>
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>
436 <para>
437 is a login shell for SSH accounts to provide restricted Git
438 access
439 </para>
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>
449 <para>
450 is invoked by <command>git archive --remote</command> and sends
451 a generated archive to the other end over the git protocol
452 </para>
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>
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
465 packing
466 </para>
467 <indexterm zone="git git-upload-pack">
468 <primary sortas="b-git-upload-pack">git-upload-pack</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
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>
485 </variablelist>
486
487 </sect2>
488
489</sect1>
Note: See TracBrowser for help on using the repository browser.