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