source: general/prog/git.xml@ 694f194

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 xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 694f194 was 694f194, checked in by Xi Ruoyao <xry111@…>, 20 months ago

git: add an optional runtime dependency to IO::Socket::SSL for git send-email

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