source: general/prog/git.xml@ f73ad111

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 f73ad111 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
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 " ">
[6030130]11 <!ENTITY git-md5sum "93ee0f867f81a39e0ef29eabfb1d2c5b">
[dcfd59e]12 <!ENTITY git-size "5.4 MB">
[7e09b3f]13 <!-- using gcc-8.1 the build and install are much bigger than with gcc-7.3 -->
[6030130]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)">
[800f6b1]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">
[32696a4]30 <primary sortas="a-Git">Git</primary>
[800f6b1]31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Git</title>
35
[32696a4]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
[bdf19997]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
[9276b6ee]44 files, much like tools such as <xref linkend="mercurial"/>,
[32696a4]45 <application>Bazaar</application>, <xref linkend="subversion"/>,
[d1c51434]46 <ulink url="http://www.nongnu.org/cvs/">CVS</ulink>,
47 <application>Perforce</application>, and
[32696a4]48 <application>Team Foundation Server</application>.
49 </para>
[800f6b1]50
[6030130]51 &lfs90_checked;
[800f6b1]52
53 <bridgehead renderas="sect3">Package Information</bridgehead>
54 <itemizedlist spacing="compact">
55 <listitem>
[32696a4]56 <para>
57 Download (HTTP): <ulink url="&git-download-http;"/>
58 </para>
[800f6b1]59 </listitem>
60 <listitem>
[32696a4]61 <para>
62 Download (FTP): <ulink url="&git-download-ftp;"/>
63 </para>
[800f6b1]64 </listitem>
65 <listitem>
[32696a4]66 <para>
67 Download MD5 sum: &git-md5sum;
68 </para>
[800f6b1]69 </listitem>
70 <listitem>
[32696a4]71 <para>
72 Download size: &git-size;
73 </para>
[800f6b1]74 </listitem>
75 <listitem>
[32696a4]76 <para>
77 Estimated disk space required: &git-buildsize;
78 </para>
[800f6b1]79 </listitem>
80 <listitem>
[32696a4]81 <para>
82 Estimated build time: &git-time;
83 </para>
[800f6b1]84 </listitem>
85 </itemizedlist>
86
[435934c]87 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
88 <itemizedlist spacing="compact">
89 <listitem>
[32696a4]90 <para>
[a79f8e7]91 <ulink url="&git-root;/git-manpages-&git-version;.tar.xz">
[7053ca8]92 &git-root;/git-manpages-&git-version;.tar.xz</ulink>
[2bbb3379]93 (not needed if you've installed <xref linkend="asciidoc"/>,
94 <xref linkend="xmlto"/>, and prefer to rebuild them)
[32696a4]95 </para>
[435934c]96 </listitem>
97 <listitem>
[32696a4]98 <para>
[a79f8e7]99 <ulink url="&git-root;/git-htmldocs-&git-version;.tar.xz">
[7053ca8]100 &git-root;/git-htmldocs-&git-version;.tar.xz</ulink>
[2bbb3379]101 and other docs (not needed if you've installed
102 <xref linkend="asciidoc"/> and want to rebuild the documentation).
[32696a4]103 </para>
[435934c]104 </listitem>
105 </itemizedlist>
106
[800f6b1]107 <bridgehead renderas="sect3">Git Dependencies</bridgehead>
108
109 <bridgehead renderas="sect4">Recommended</bridgehead>
[1b2d41b]110 <para role="recommended">
[4f8ca94]111 <xref linkend="curl"/> (needed to use <application>Git</application> over
112 http, https, ftp or ftps)
[1b2d41b]113 </para>
[800f6b1]114
115 <bridgehead renderas="sect4">Optional</bridgehead>
[1b2d41b]116 <para role="optional">
[d86a91f]117 <xref linkend="pcre2"/> (<emphasis>or</emphasis> the deprecated <xref
[cac7f93]118 role="nodep" linkend="pcre"/>), in either case configured with
[d86a91f]119 <literal>--enable-jit</literal>,
[4f8ca94]120 <xref linkend="python2"/>,
121 <xref linkend="subversion"/> with Perl bindings (for <command>git
122 svn</command>),
[572553b]123 <xref role="runtime" linkend="tk"/>
124 (gitk, a simple <application>Git</application>
[f9f13ae]125 repository viewer, uses <application>Tk</application> at runtime), and
126 <xref linkend="valgrind"/>
[1b2d41b]127 </para>
128
[28814022]129 <bridgehead renderas="sect4">Optional (to create the man pages, html docs
130 and other docs)</bridgehead>
[464f030]131 <para role="optional">
[fad8db2]132 <xref linkend="xmlto"/> and
[9faa23b6]133 <xref linkend="asciidoc"/> or
[28814022]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
[1b2d41b]139 </para>
[800f6b1]140
141 <para condition="html" role="usernotes">User Notes:
[32696a4]142 <ulink url="&blfs-wiki;/git"/>
143 </para>
[800f6b1]144 </sect2>
145
146 <sect2 role="installation">
147 <title>Installation of Git</title>
148
[32696a4]149 <para>
150 Install <application>Git</application> by running the following
151 commands:
152 </para>
[800f6b1]153
[bdf19997]154<screen><userinput>./configure --prefix=/usr --with-gitconfig=/etc/gitconfig &amp;&amp;
[800f6b1]155make</userinput></screen>
156
[6e08e9c0]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
[32696a4]163 <para>
[9faa23b6]164 If you have installed <xref linkend="asciidoc"/> you can
[32696a4]165 create the html version of the man pages and other docs:
166 </para>
[800f6b1]167
[a42c273]168<screen remap="doc"><userinput>make html</userinput></screen>
[800f6b1]169
[32696a4]170 <para>
[9faa23b6]171 If you have installed <xref linkend="asciidoc"/> and
[32696a4]172 <xref linkend="xmlto"/> you can create the man pages:
173 </para>
[435934c]174
[a42c273]175<screen remap="doc"><userinput>make man</userinput></screen>
[435934c]176
[32696a4]177 <para>
[28814022]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.
[32696a4]181 </para>
[800f6b1]182
[32696a4]183 <para>
184 Now, as the <systemitem class="username">root</systemitem>
185 user:
186 </para>
[800f6b1]187
188<screen role="root"><userinput>make install</userinput></screen>
189
[6e08e9c0]190<!-- ==== Method 1 for docs ====== -->
191 <bridgehead renderas="sect3">If you created the man pages and/or html docs</bridgehead>
192
[32696a4]193 <para>
[6e08e9c0]194 Install the man pages as
[32696a4]195 <systemitem class="username">root</systemitem> user:
196 </para>
[800f6b1]197
[06908bf6]198<screen role="root"
199 remap="doc"><userinput>make install-man</userinput></screen>
[435934c]200
[32696a4]201 <para>
[6e08e9c0]202 Install the html docs as
[32696a4]203 <systemitem class="username">root</systemitem> user:
204 </para>
[435934c]205
[06908bf6]206<screen role="root"
207 remap="doc"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html</userinput></screen>
[6e08e9c0]208
209<!-- ==== Method 2 for docs ====== -->
210 <bridgehead renderas="sect3">If you downloaded the man pages and/or html docs</bridgehead>
[435934c]211
[32696a4]212 <para>
[6e08e9c0]213 If you downloaded the man pages untar them as the
[32696a4]214 <systemitem class="username">root</systemitem> user:
215 </para>
[435934c]216
[64419b7]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>
[435934c]219
[32696a4]220 <para>
221 If you downloaded the html docs untar them as the
222 <systemitem class="username">root</systemitem> user:
223 </para>
[435934c]224
[78a00a4e]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;
[0524804]228
[78a00a4e]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>
[c4ab33b5]231
[6e08e9c0]232<!-- ==== Reorganize docs ====== -->
[28814022]233 <bridgehead renderas="sect3">Reorganize text and html in the html-docs (both methods)</bridgehead>
[6e08e9c0]234
235 <para>
[28814022]236 For both methods, the html-docs include a lot of plain text files.
237 Reorganize the files as the
[6e08e9c0]238 <systemitem class="username">root</systemitem> user:
239 </para>
240
[78a00a4e]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;
[64419b7]244
[78a00a4e]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;
[6da25cc8]251mv /usr/share/doc/git-&git-version;/howto/{*.,}html &amp;&amp;
252
[d86a91f]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>
[32696a4]255
[800f6b1]256 </sect2>
257
258 <sect2 role="commands">
259 <title>Command Explanations</title>
260
[5e5a8d5]261 <para>
[35943a41]262 <parameter>--with-gitconfig=/etc/gitconfig</parameter>: This sets
[5e5a8d5]263 <filename>/etc/gitconfig</filename> as the file that stores
264 the default, system wide, <application>Git</application>
265 settings.
266 </para>
267
[32696a4]268 <para>
[4f8ca94]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.
[32696a4]273 </para>
[435934c]274
[32696a4]275 <para>
[d86a91f]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>
[ff104798]282 <option>--with-libpcre</option>: As an alternative to PCRE2, use this
[d86a91f]283 switch if the deprecated <application>PCRE</application> is installed
284 and has been built with the non-default JIT enabled.
[32696a4]285 </para>
[0524804]286
[32696a4]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>
[0524804]298
[32696a4]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>
[435934c]304
[c4ab33b5]305 <para>
[49ee8357]306 <command>find ... chmod ...</command>: These commands correct the
[c4ab33b5]307 permissions in the shipped documentation tar file.
308 </para>
309
[800f6b1]310 </sect2>
311
312 <sect2 role="configuration">
313 <title>Configuring Git</title>
314
315 <sect3 id="git-config">
316 <title>Config Files</title>
[32696a4]317 <para>
318 <filename>~/.gitconfig</filename> and
319 <filename>/etc/gitconfig</filename>
320 </para>
[800f6b1]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>
[32696a4]329
[800f6b1]330 </sect3>
331
332 </sect2>
333
334 <sect2 role="content">
335 <title>Contents</title>
336
337 <segmentedlist>
338 <segtitle>Installed Programs</segtitle>
[c3c56b2]339 <segtitle>Installed Libraries</segtitle>
[800f6b1]340 <segtitle>Installed Directories</segtitle>
341
342 <seglistitem>
[32696a4]343 <seg>
[2bbb3379]344 git, git-receive-pack and git-upload-archive (hardlinked to each
345 other), git-cvsserver, git-shell, git-upload-pack, and gitk
[32696a4]346 </seg>
347 <seg>
348 None
349 </seg>
350 <seg>
[c4e893d]351 /usr/share/perl5/Git,
352 <!-- I do NOT think this is in our %INC search path. -->
[9276b6ee]353 /usr/libexec/git-core and
[5a04ffa]354 /usr/share/{doc/git-&git-version;,git-core,git-gui,gitk,gitweb}
[32696a4]355 </seg>
[800f6b1]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>
[32696a4]367 <para>
368 is the stupid content tracker.
369 </para>
[800f6b1]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>
[32696a4]379 <para>
380 is a CVS server emulator for <application>Git</application>.
381 </para>
[800f6b1]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>
[32696a4]391 <para>
[a79f8e7]392 is a graphical <application>Git</application> repository browser
393 (needs <xref linkend="tk"/>).
[32696a4]394 </para>
[800f6b1]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>
[32696a4]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>
[800f6b1]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>
[32696a4]417 <para>
418 is a login shell for SSH accounts to provide restricted Git
419 access.
420 </para>
[800f6b1]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>
[32696a4]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>
[800f6b1]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>
[32696a4]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>
[800f6b1]448 <indexterm zone="git git-upload-pack">
449 <primary sortas="b-git-upload-pack">git-upload-pack</primary>
450 </indexterm>
451 </listitem>
452 </varlistentry>
[32696a4]453
[800f6b1]454 </variablelist>
[32696a4]455
[800f6b1]456 </sect2>
[32696a4]457
[800f6b1]458</sect1>
Note: See TracBrowser for help on using the repository browser.