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