source: general/prog/git.xml@ c5353a8

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.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 c5353a8 was c5353a8, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Add GnuTLS as an optional dependency of GnuPG.
Update libcdio aux file to libcdio-paranoia-10.2+0.94+1.
Update to Text-BibTeX-0.80 (Perl Mopdule).
Update to Net-DNS-1.09 (Perl Module).
Update to git 2.12.2.
Update to nspr 4.14.

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

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