source: general/prog/git.xml@ 0af9c984

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules 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 0af9c984 was 0af9c984, checked in by Thomas Trepl <thomas@…>, 6 years ago

Version 2.5.1, #10084

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

  • Property mode set to 100644
File size: 15.4 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 " ">
[0af9c984]11 <!ENTITY git-md5sum "48f7904c4401864751de7d52949f5de5">
[72772afe]12 <!ENTITY git-size "4.7 MB">
[d86a91f]13 <!-- space measured on 2.14.0 with gcc-7.1, glibc-2.25+git, all deps except dblatex.
[b7a300f7]14 The build gets up to 529MB (520 in 2.14.2), but the separate docs add 15 MB -->
[72772afe]15 <!ENTITY git-buildsize "431 MB (with downloaded documentation)">
16 <!ENTITY git-time "0.3 SBU (with parallelism=4; add 1.5 SBU for tests with parallelism=4)">
[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
[5ae3416]51 &lfs81_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">
[0d7900a]111 <xref linkend="curl"/> (needed to use <application>Git</application> over http,
[32696a4]112 https, ftp or ftps),
[bd790c97]113 <xref linkend="openssl"/>,
114 <xref linkend="perl-error"/>, and
[32696a4]115 <xref linkend="python2"/>
[1b2d41b]116 </para>
[800f6b1]117
118 <bridgehead renderas="sect4">Optional</bridgehead>
[1b2d41b]119 <para role="optional">
[d86a91f]120 <xref linkend="pcre2"/> (<emphasis>or</emphasis> the deprecated <xref
121 linkend="pcre"/>), in either case configured with
122 <literal>--enable-jit</literal>,
[f9f13ae]123 <xref linkend="subversion"/> with Perl bindings (for <command>git svn</command>),
[572553b]124 <xref role="runtime" linkend="tk"/>
125 (gitk, a simple <application>Git</application>
[f9f13ae]126 repository viewer, uses <application>Tk</application> at runtime), and
127 <xref linkend="valgrind"/>
[1b2d41b]128 </para>
129
[28814022]130 <bridgehead renderas="sect4">Optional (to create the man pages, html docs
131 and other docs)</bridgehead>
[464f030]132 <para role="optional">
[fad8db2]133 <xref linkend="xmlto"/> and
[9faa23b6]134 <xref linkend="asciidoc"/> or
[28814022]135 <ulink url="http://asciidoctor.org/">AsciiDoctor</ulink>, and also
136 <ulink url="http://dblatex.sourceforge.net/">dblatex</ulink>
137 (for the PDF version of the user manual), and
138 <ulink url="http://docbook2x.sourceforge.net/">docbook2x</ulink> to
139 create info pages
[1b2d41b]140 </para>
[800f6b1]141
142 <para condition="html" role="usernotes">User Notes:
[32696a4]143 <ulink url="&blfs-wiki;/git"/>
144 </para>
[800f6b1]145 </sect2>
146
147 <sect2 role="installation">
148 <title>Installation of Git</title>
149
[32696a4]150 <para>
151 Install <application>Git</application> by running the following
152 commands:
153 </para>
[800f6b1]154
[bdf19997]155<screen><userinput>./configure --prefix=/usr --with-gitconfig=/etc/gitconfig &amp;&amp;
[800f6b1]156make</userinput></screen>
157
[6e08e9c0]158 <para>
159 You can build the man pages and/or html docs, or
160 use downloaded ones. If you choose to build them, use next two following
161 instructions.
162 </para>
163
[32696a4]164 <para>
[9faa23b6]165 If you have installed <xref linkend="asciidoc"/> you can
[32696a4]166 create the html version of the man pages and other docs:
167 </para>
[800f6b1]168
[65fe9d8]169<screen><userinput>make html</userinput></screen>
[800f6b1]170
[32696a4]171 <para>
[9faa23b6]172 If you have installed <xref linkend="asciidoc"/> and
[32696a4]173 <xref linkend="xmlto"/> you can create the man pages:
174 </para>
[435934c]175
[65fe9d8]176<screen><userinput>make man</userinput></screen>
[435934c]177
[32696a4]178 <para>
[28814022]179 The test suite can be run in parallel mode. To run the test suite, issue:
180 <command>make test</command>. If run as a normal user, 0 tests should be
181 reported as failed in the final summary.
[32696a4]182 </para>
[800f6b1]183
[32696a4]184 <para>
185 Now, as the <systemitem class="username">root</systemitem>
186 user:
187 </para>
[800f6b1]188
189<screen role="root"><userinput>make install</userinput></screen>
190
[6e08e9c0]191<!-- ==== Method 1 for docs ====== -->
192 <bridgehead renderas="sect3">If you created the man pages and/or html docs</bridgehead>
193
[32696a4]194 <para>
[6e08e9c0]195 Install the man pages as
[32696a4]196 <systemitem class="username">root</systemitem> user:
197 </para>
[800f6b1]198
199<screen role="root"><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
[6e08e9c0]206<screen role="root"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html</userinput></screen>
207
208<!-- ==== Method 2 for docs ====== -->
209 <bridgehead renderas="sect3">If you downloaded the man pages and/or html docs</bridgehead>
[435934c]210
[32696a4]211 <para>
[6e08e9c0]212 If you downloaded the man pages untar them as the
[32696a4]213 <systemitem class="username">root</systemitem> user:
214 </para>
[435934c]215
[64419b7]216<screen role="root"><userinput>tar -xf ../git-manpages-&git-version;.tar.xz \
217 -C /usr/share/man --no-same-owner --no-overwrite-dir</userinput></screen>
[435934c]218
[32696a4]219 <para>
220 If you downloaded the html docs untar them as the
221 <systemitem class="username">root</systemitem> user:
222 </para>
[435934c]223
[78a00a4e]224<screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version; &amp;&amp;
225tar -xf ../git-htmldocs-&git-version;.tar.xz \
226 -C /usr/share/doc/git-&git-version; --no-same-owner --no-overwrite-dir &amp;&amp;
[0524804]227
[78a00a4e]228find /usr/share/doc/git-&git-version; -type d -exec chmod 755 {} \; &amp;&amp;
229find /usr/share/doc/git-&git-version; -type f -exec chmod 644 {} \;</userinput></screen>
[c4ab33b5]230
[6e08e9c0]231<!-- ==== Reorganize docs ====== -->
[28814022]232 <bridgehead renderas="sect3">Reorganize text and html in the html-docs (both methods)</bridgehead>
[6e08e9c0]233
234 <para>
[28814022]235 For both methods, the html-docs include a lot of plain text files.
236 Reorganize the files as the
[6e08e9c0]237 <systemitem class="username">root</systemitem> user:
238 </para>
239
[78a00a4e]240<screen role="root"><userinput>mkdir -vp /usr/share/doc/git-&git-version;/man-pages/{html,text} &amp;&amp;
241mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &amp;&amp;
242mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &amp;&amp;
[64419b7]243
[78a00a4e]244mkdir -vp /usr/share/doc/git-&git-version;/technical/{html,text} &amp;&amp;
245mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &amp;&amp;
246mv /usr/share/doc/git-&git-version;/technical/{*.,}html &amp;&amp;
247
248mkdir -vp /usr/share/doc/git-&git-version;/howto/{html,text} &amp;&amp;
249mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &amp;&amp;
[6da25cc8]250mv /usr/share/doc/git-&git-version;/howto/{*.,}html &amp;&amp;
251
[d86a91f]252sed -i '/^&lt;a href=/s|howto/|&amp;html/|' /usr/share/doc/git-&git-version;/howto-index.html &amp;&amp;
253sed -i '/^\* link:/s|howto/|&amp;html/|' /usr/share/doc/git-&git-version;/howto-index.txt</userinput></screen>
[32696a4]254
[800f6b1]255 </sect2>
256
257 <sect2 role="commands">
258 <title>Command Explanations</title>
259
[5e5a8d5]260 <para>
[35943a41]261 <parameter>--with-gitconfig=/etc/gitconfig</parameter>: This sets
[5e5a8d5]262 <filename>/etc/gitconfig</filename> as the file that stores
263 the default, system wide, <application>Git</application>
264 settings.
265 </para>
266
[32696a4]267 <para>
268 <option>--without-python</option>: Use this switch if
269 <application>Python</application> is not installed.
270 </para>
[435934c]271
[32696a4]272 <para>
[d86a91f]273 <option>--with-libpcre2</option>: Use this switch if
274 <application>PCRE2</application> is installed and has been built with
275 the non-default JIT enabled.
276 </para>
277
278 <para>
[ff104798]279 <option>--with-libpcre</option>: As an alternative to PCRE2, use this
[d86a91f]280 switch if the deprecated <application>PCRE</application> is installed
281 and has been built with the non-default JIT enabled.
[32696a4]282 </para>
[0524804]283
[32696a4]284 <para>
285 <command>tar -xf ../git-manpages-&git-version;.tar.gz -C
286 /usr/share/man --no-same-owner</command>: This untars
287 <filename>git-manpages-&git-version;.tar.gz</filename>. The
288 <option>-C</option> option makes tar change directory to
289 <filename class="directory">/usr/share/man</filename> before
290 it starts to decompress the docs. The <option>--no-same-owner</option>
291 option stops tar from preserving the user and group details of the
292 files. This is useful as that user or group may not exist on your
293 system; this could (potentially) be a security risk.
294 </para>
[0524804]295
[32696a4]296 <para>
297 <command>mv /usr/share/doc/git-&git-version; ...</command>: These
298 commands move some of the files into subfolders to make it easier to sort
299 through the docs and find what you're looking for.
300 </para>
[435934c]301
[c4ab33b5]302 <para>
[49ee8357]303 <command>find ... chmod ...</command>: These commands correct the
[c4ab33b5]304 permissions in the shipped documentation tar file.
305 </para>
306
[800f6b1]307 </sect2>
308
309 <sect2 role="configuration">
310 <title>Configuring Git</title>
311
312 <sect3 id="git-config">
313 <title>Config Files</title>
[32696a4]314 <para>
315 <filename>~/.gitconfig</filename> and
316 <filename>/etc/gitconfig</filename>
317 </para>
[800f6b1]318
319 <indexterm zone="git git-config">
320 <primary sortas="e-AA.gitconfig">~/.gitconfig</primary>
321 </indexterm>
322
323 <indexterm zone="git git-config">
324 <primary sortas="e-etc-gitconfig">/etc/gitconfig</primary>
325 </indexterm>
[32696a4]326
[800f6b1]327 </sect3>
328
329 </sect2>
330
331 <sect2 role="content">
332 <title>Contents</title>
333
334 <segmentedlist>
335 <segtitle>Installed Programs</segtitle>
[c3c56b2]336 <segtitle>Installed Libraries</segtitle>
[800f6b1]337 <segtitle>Installed Directories</segtitle>
338
339 <seglistitem>
[32696a4]340 <seg>
[2bbb3379]341 git, git-receive-pack and git-upload-archive (hardlinked to each
342 other), git-cvsserver, git-shell, git-upload-pack, and gitk
[32696a4]343 </seg>
344 <seg>
345 None
346 </seg>
347 <seg>
[4c44c67]348 /usr/lib/perl5/site_perl/&lt;5.x.y&gt;{,&lt;arch&gt;-linux/auto}/Git,
[9276b6ee]349 /usr/libexec/git-core and
[5a04ffa]350 /usr/share/{doc/git-&git-version;,git-core,git-gui,gitk,gitweb}
[32696a4]351 </seg>
[800f6b1]352 </seglistitem>
353 </segmentedlist>
354
355 <variablelist>
356 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
357 <?dbfo list-presentation="list"?>
358 <?dbhtml list-presentation="table"?>
359
360 <varlistentry id="git-prog">
361 <term><command>git</command></term>
362 <listitem>
[32696a4]363 <para>
364 is the stupid content tracker.
365 </para>
[800f6b1]366 <indexterm zone="git git-prog">
367 <primary sortas="b-git">git</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="git-cvsserver">
373 <term><command>git-cvsserver</command></term>
374 <listitem>
[32696a4]375 <para>
376 is a CVS server emulator for <application>Git</application>.
377 </para>
[800f6b1]378 <indexterm zone="git git-cvsserver">
379 <primary sortas="b-git-cvsserver">git-cvsserver</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="gitk">
385 <term><command>gitk</command></term>
386 <listitem>
[32696a4]387 <para>
[a79f8e7]388 is a graphical <application>Git</application> repository browser
389 (needs <xref linkend="tk"/>).
[32696a4]390 </para>
[800f6b1]391 <indexterm zone="git gitk">
392 <primary sortas="b-gitk">gitk</primary>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="git-receive-pack">
398 <term><command>git-receive-pack</command></term>
399 <listitem>
[32696a4]400 <para>
401 is invoked by <command>git send-pack</command> and updates the
402 repository with the information fed from the remote end.
403 </para>
[800f6b1]404 <indexterm zone="git git-receive-pack">
405 <primary sortas="b-git-receive-pack">git-receive-pack</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="git-shell">
411 <term><command>git-shell</command></term>
412 <listitem>
[32696a4]413 <para>
414 is a login shell for SSH accounts to provide restricted Git
415 access.
416 </para>
[800f6b1]417 <indexterm zone="git git-shell">
418 <primary sortas="b-git-shell">git-shell</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="git-upload-archive">
424 <term><command>git-upload-archive</command></term>
425 <listitem>
[32696a4]426 <para>
427 is invoked by <command>git archive --remote</command> and sends
428 a generated archive to the other end over the git protocol.
429 </para>
[800f6b1]430 <indexterm zone="git git-upload-archive">
431 <primary sortas="b-git-upload-archive">git-upload-archive</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="git-upload-pack">
437 <term><command>git-upload-pack</command></term>
438 <listitem>
[32696a4]439 <para>
440 is invoked by <command>git fetch-pack</command>, it discovers
441 what objects the other side is missing, and sends them after
442 packing.
443 </para>
[800f6b1]444 <indexterm zone="git git-upload-pack">
445 <primary sortas="b-git-upload-pack">git-upload-pack</primary>
446 </indexterm>
447 </listitem>
448 </varlistentry>
[32696a4]449
[800f6b1]450 </variablelist>
[32696a4]451
[800f6b1]452 </sect2>
[32696a4]453
[800f6b1]454</sect1>
Note: See TracBrowser for help on using the repository browser.