source: general/prog/git.xml@ cac7f93

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 cac7f93 was cac7f93, checked in by Pierre Labastie <pieere@…>, 5 years ago

Add some "nodep" role to alternative dependencies. Mostly does not change
the rendered book, but allows to simplify the dependency chain for jhalfs

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

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