source: general/prog/git.xml@ aaed964

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since aaed964 was aaed964, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

ffmpeg-2.2.1, git-1.9.2, iso-codes-3.52, xfburn-0.5.2 and gnome-calculator-3.12.1.

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

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