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