[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 |
|
---|
| 7 | <!ENTITY git-download-http
|
---|
| 8 | "http://git-core.googlecode.com/files/git-&git-version;.tar.gz">
|
---|
| 9 | <!ENTITY git-download-ftp " ">
|
---|
[0524804] | 10 | <!ENTITY git-md5sum "f2f0fc821ab074862c4a96de3f4cefbe">
|
---|
[800f6b1] | 11 | <!ENTITY git-size "3.4 MB">
|
---|
[0524804] | 12 | <!ENTITY git-buildsize "153 MB">
|
---|
| 13 | <!ENTITY git-time "3.0 SBU (including tests)">
|
---|
[800f6b1] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="git" xreflabel="git-&git-version;">
|
---|
| 17 | <?dbhtml filename="git.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
| 23 |
|
---|
| 24 | <title>Git-&git-version;</title>
|
---|
| 25 |
|
---|
| 26 | <indexterm zone="git">
|
---|
| 27 | <primary sortas="a-git">Git</primary>
|
---|
| 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
| 31 | <title>Introduction to Git</title>
|
---|
| 32 |
|
---|
| 33 | <para><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>.</para>
|
---|
| 44 |
|
---|
[4c77a949] | 45 | &lfs71_checked;
|
---|
[800f6b1] | 46 |
|
---|
| 47 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 48 | <itemizedlist spacing="compact">
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download (HTTP): <ulink url="&git-download-http;"/></para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download (FTP): <ulink url="&git-download-ftp;"/></para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Download MD5 sum: &git-md5sum;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Download size: &git-size;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>Estimated disk space required: &git-buildsize;</para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>Estimated build time: &git-time;</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
| 68 |
|
---|
[435934c] | 69 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 70 | <itemizedlist spacing="compact">
|
---|
| 71 | <listitem>
|
---|
| 72 | <para><ulink
|
---|
[0524804] | 73 | url="http://git-core.googlecode.com/files/git-manpages-&git-version;.tar.gz">
|
---|
| 74 | http://git-core.googlecode.com/files/git-manpages-&git-version;.tar.gz</ulink>
|
---|
[1b2d41b] | 75 | (only needed if you've not installed asciidoc)</para>
|
---|
[435934c] | 76 | </listitem>
|
---|
| 77 | <listitem>
|
---|
| 78 | <para><ulink
|
---|
[0524804] | 79 | url="http://git-core.googlecode.com/files/git-htmldocs-&git-version;.tar.gz">
|
---|
| 80 | http://git-core.googlecode.com/files/git-htmldocs-&git-version;.tar.gz</ulink>
|
---|
[1b2d41b] | 81 | and other docs (only needed if you've not installed asciidoc and xmlto).</para>
|
---|
[435934c] | 82 | </listitem>
|
---|
| 83 | </itemizedlist>
|
---|
| 84 |
|
---|
[800f6b1] | 85 | <bridgehead renderas="sect3">Git Dependencies</bridgehead>
|
---|
| 86 |
|
---|
| 87 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[1b2d41b] | 88 | <para role="recommended">
|
---|
[068521ee] | 89 | <xref linkend="python2"/> and
|
---|
[1b2d41b] | 90 | <xref linkend="curl"/> (needed to use <application>Git</application> over http,
|
---|
| 91 | https, ftp or ftps)
|
---|
| 92 | </para>
|
---|
[800f6b1] | 93 |
|
---|
| 94 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[1b2d41b] | 95 | <para role="optional">
|
---|
| 96 | <xref linkend="openssl"/>,
|
---|
| 97 | <xref linkend="expat"/>, and
|
---|
| 98 | <xref linkend="tk"/> (gitk, a simple <application>Git</application>
|
---|
| 99 | repository viewer, uses <application>Tk</application> at runtime)
|
---|
| 100 | </para>
|
---|
| 101 |
|
---|
| 102 | <bridgehead renderas="sect4">Optional (to create the man pages and html docs)</bridgehead>
|
---|
| 103 | <para>
|
---|
| 104 | <ulink url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> and
|
---|
| 105 | <xref linkend="xmlto"/>
|
---|
| 106 | </para>
|
---|
[800f6b1] | 107 |
|
---|
| 108 | <para condition="html" role="usernotes">User Notes:
|
---|
| 109 | <ulink url="&blfs-wiki;/git"/></para>
|
---|
| 110 | </sect2>
|
---|
| 111 |
|
---|
| 112 | <sect2 role="installation">
|
---|
| 113 | <title>Installation of Git</title>
|
---|
| 114 |
|
---|
| 115 | <para>Install <application>Git</application> by running the following
|
---|
| 116 | commands:</para>
|
---|
| 117 |
|
---|
[97766ace] | 118 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 119 | --libexecdir=/usr/lib \
|
---|
| 120 | --with-gitconfig=/etc/gitconfig &&
|
---|
[800f6b1] | 121 | make</userinput></screen>
|
---|
| 122 |
|
---|
| 123 | <para>If you have installed <ulink
|
---|
[435934c] | 124 | url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> and you wish to
|
---|
| 125 | create the man pages:</para>
|
---|
[800f6b1] | 126 |
|
---|
| 127 | <screen><userinput>make man</userinput></screen>
|
---|
| 128 |
|
---|
[435934c] | 129 | <para>If you have installed <ulink
|
---|
| 130 | url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> and
|
---|
| 131 | <xref linkend="xmlto"/> you can create the html version of the man
|
---|
| 132 | pages and other docs:</para>
|
---|
| 133 |
|
---|
| 134 | <screen><userinput>make html</userinput></screen>
|
---|
| 135 |
|
---|
[800f6b1] | 136 | <para>To check the results, issue: <command>make test</command>.</para>
|
---|
| 137 |
|
---|
| 138 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
| 139 | user:</para>
|
---|
| 140 |
|
---|
| 141 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 142 |
|
---|
[435934c] | 143 | <para>If you created the man pages, install them as the
|
---|
| 144 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[800f6b1] | 145 |
|
---|
| 146 | <screen role="root"><userinput>make install-man</userinput></screen>
|
---|
[435934c] | 147 |
|
---|
| 148 | <para>If you created the html docs, install them as the
|
---|
| 149 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 150 |
|
---|
[0524804] | 151 | <screen role="root"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html &&
|
---|
| 152 | mkdir -p /usr/share/doc/git-&git-version;/man-pages/{html,text} &&
|
---|
| 153 | mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &&
|
---|
| 154 | mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &&
|
---|
| 155 | mkdir /usr/share/doc/git-&git-version;/technical/{html,text} &&
|
---|
| 156 | mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &&
|
---|
| 157 | mv /usr/share/doc/git-&git-version;/technical/{*.,}html &&
|
---|
| 158 | mkdir /usr/share/doc/git-&git-version;/howto/{html,text} &&
|
---|
| 159 | mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &&
|
---|
| 160 | mv /usr/share/doc/git-&git-version;/howto/{*.,}html</userinput></screen>
|
---|
[435934c] | 161 |
|
---|
| 162 | <para>Alternatively, If you downloaded the man pages untar them as the
|
---|
| 163 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 164 |
|
---|
[0524804] | 165 | <screen role="root"><userinput>tar -xf ../git-manpages-&git-version;.tar.gz -C /usr/share/man --no-same-owner</userinput></screen>
|
---|
[435934c] | 166 |
|
---|
| 167 | <para>If you downloaded the html docs untar them as the
|
---|
| 168 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 169 |
|
---|
[0524804] | 170 | <screen role="root"><userinput>mkdir -p /usr/share/doc/git-&git-version;/man-pages/{html,text} &&
|
---|
| 171 |
|
---|
| 172 | tar -xf ../git-htmldocs-&git-version;.tar.gz \
|
---|
| 173 | -C /usr/share/doc/git-&git-version; --no-same-owner &&
|
---|
| 174 |
|
---|
| 175 | mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &&
|
---|
| 176 | mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &&
|
---|
| 177 | mkdir /usr/share/doc/git-&git-version;/technical/{html,text} &&
|
---|
| 178 | mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &&
|
---|
| 179 | mv /usr/share/doc/git-&git-version;/technical/{*.,}html &&
|
---|
| 180 | mkdir /usr/share/doc/git-&git-version;/howto/{html,text} &&
|
---|
| 181 | mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &&
|
---|
| 182 | mv /usr/share/doc/git-&git-version;/howto/{*.,}html</userinput></screen>
|
---|
[800f6b1] | 183 | </sect2>
|
---|
| 184 |
|
---|
| 185 | <sect2 role="commands">
|
---|
| 186 | <title>Command Explanations</title>
|
---|
| 187 |
|
---|
[97766ace] | 188 | <para><option>--libexecdir=/usr/lib</option>: Place git library files
|
---|
| 189 | correctly.</para>
|
---|
| 190 |
|
---|
[0524804] | 191 | <para><option>--with-gitconfig=/etc/gitconfig</option>: This sets
|
---|
[800f6b1] | 192 | <filename>/etc/gitconfig</filename> as the file that stores the default,
|
---|
| 193 | system wide, <application>Git</application> settings.</para>
|
---|
[435934c] | 194 |
|
---|
[0524804] | 195 | <para><option>--without-python</option>: Use this option if python is
|
---|
| 196 | not installed.</para>
|
---|
| 197 |
|
---|
| 198 | <para><option>--with-libpcre</option>: Use this option if PCRE is
|
---|
| 199 | installed.</para>
|
---|
| 200 |
|
---|
| 201 | <para><command>tar -xf ../git-manpages-&git-version;.tar.gz -C
|
---|
[435934c] | 202 | /usr/share/man --no-same-owner</command>: This untars
|
---|
[0524804] | 203 | <filename>git-manpages-&git-version;.tar.gz</filename>. The
|
---|
[435934c] | 204 | <option>-C</option> option makes tar change directory to
|
---|
| 205 | <filename class="directory">/usr/share/man</filename> before it starts to
|
---|
| 206 | decompress the docs. The <option>--no-same-owner</option> option stops tar
|
---|
| 207 | from preserving the user and group details of the files. This is useful as
|
---|
| 208 | that user or group may not exist on your system; this could
|
---|
| 209 | (potentially) be a security risk.</para>
|
---|
| 210 |
|
---|
| 211 | <para><command>mv /usr/share/doc/git-&git-version; ...</command>: These
|
---|
| 212 | commands move some of the files into subfolders to make it easier to sort
|
---|
| 213 | through the docs and find what you're looking for.</para>
|
---|
[800f6b1] | 214 | </sect2>
|
---|
| 215 |
|
---|
| 216 | <sect2 role="configuration">
|
---|
| 217 | <title>Configuring Git</title>
|
---|
| 218 |
|
---|
| 219 | <sect3 id="git-config">
|
---|
| 220 | <title>Config Files</title>
|
---|
| 221 | <para><filename>~/.gitconfig</filename> and
|
---|
| 222 | <filename>/etc/gitconfig</filename></para>
|
---|
| 223 |
|
---|
| 224 | <indexterm zone="git git-config">
|
---|
| 225 | <primary sortas="e-AA.gitconfig">~/.gitconfig</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 |
|
---|
| 228 | <indexterm zone="git git-config">
|
---|
| 229 | <primary sortas="e-etc-gitconfig">/etc/gitconfig</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 | </sect3>
|
---|
| 232 |
|
---|
| 233 | <sect3><title>Configuration Information</title>
|
---|
| 234 |
|
---|
[78bd08a] | 235 | <para>If you want to use <command>git svn</command> you will need to
|
---|
| 236 | install <xref linkend="subversion"/> and its perl bindings.</para>
|
---|
[800f6b1] | 237 |
|
---|
[874fec7f] | 238 | <para>To be able to use git to pull from a https source you need first
|
---|
| 239 | install the <xref linkend="cacerts"/> and then configure git to know where
|
---|
[78bd08a] | 240 | they are. To set the default location of the SSL certificates, as the
|
---|
[874fec7f] | 241 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[800f6b1] | 242 |
|
---|
[874fec7f] | 243 | <screen role="root"><userinput>git config --system http.sslCAPath /etc/ssl/certs</userinput></screen>
|
---|
[800f6b1] | 244 | </sect3>
|
---|
| 245 | </sect2>
|
---|
| 246 |
|
---|
| 247 | <sect2 role="content">
|
---|
| 248 | <title>Contents</title>
|
---|
| 249 |
|
---|
| 250 | <segmentedlist>
|
---|
| 251 | <segtitle>Installed Programs</segtitle>
|
---|
| 252 | <segtitle>Installed Directories</segtitle>
|
---|
| 253 |
|
---|
| 254 | <seglistitem>
|
---|
| 255 | <seg>git, git-cvsserver, gitk, git-receive-pack, git-shell,
|
---|
| 256 | git-upload-archive and git-upload-pack.</seg>
|
---|
[435934c] | 257 | <seg>/usr/libexec/git-core, /usr/share/git-&git-version;,
|
---|
| 258 | /usr/share/git-core, /usr/share/git-gui, /usr/share/gitk and
|
---|
| 259 | /usr/share/gitweb</seg>
|
---|
[800f6b1] | 260 | </seglistitem>
|
---|
| 261 | </segmentedlist>
|
---|
| 262 |
|
---|
| 263 | <variablelist>
|
---|
| 264 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 265 | <?dbfo list-presentation="list"?>
|
---|
| 266 | <?dbhtml list-presentation="table"?>
|
---|
| 267 |
|
---|
| 268 | <varlistentry id="git-prog">
|
---|
| 269 | <term><command>git</command></term>
|
---|
| 270 | <listitem>
|
---|
| 271 | <para>is the stupid content tracker.</para>
|
---|
| 272 | <indexterm zone="git git-prog">
|
---|
| 273 | <primary sortas="b-git">git</primary>
|
---|
| 274 | </indexterm>
|
---|
| 275 | </listitem>
|
---|
| 276 | </varlistentry>
|
---|
| 277 |
|
---|
| 278 | <varlistentry id="git-cvsserver">
|
---|
| 279 | <term><command>git-cvsserver</command></term>
|
---|
| 280 | <listitem>
|
---|
| 281 | <para>is a CVS server emulator for git.</para>
|
---|
| 282 | <indexterm zone="git git-cvsserver">
|
---|
| 283 | <primary sortas="b-git-cvsserver">git-cvsserver</primary>
|
---|
| 284 | </indexterm>
|
---|
| 285 | </listitem>
|
---|
| 286 | </varlistentry>
|
---|
| 287 |
|
---|
| 288 | <varlistentry id="gitk">
|
---|
| 289 | <term><command>gitk</command></term>
|
---|
| 290 | <listitem>
|
---|
| 291 | <para>is a git repository browser (needs <xref linkend="tk"/>).</para>
|
---|
| 292 | <indexterm zone="git gitk">
|
---|
| 293 | <primary sortas="b-gitk">gitk</primary>
|
---|
| 294 | </indexterm>
|
---|
| 295 | </listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
| 298 | <varlistentry id="git-receive-pack">
|
---|
| 299 | <term><command>git-receive-pack</command></term>
|
---|
| 300 | <listitem>
|
---|
| 301 | <para>is invoked by <command>git send-pack</command> and updates the
|
---|
| 302 | repository with the information fed from the remote end.</para>
|
---|
| 303 | <indexterm zone="git git-receive-pack">
|
---|
| 304 | <primary sortas="b-git-receive-pack">git-receive-pack</primary>
|
---|
| 305 | </indexterm>
|
---|
| 306 | </listitem>
|
---|
| 307 | </varlistentry>
|
---|
| 308 |
|
---|
| 309 | <varlistentry id="git-shell">
|
---|
| 310 | <term><command>git-shell</command></term>
|
---|
| 311 | <listitem>
|
---|
| 312 | <para>is a login shell for SSH accounts to provide restricted Git
|
---|
| 313 | access.</para>
|
---|
| 314 | <indexterm zone="git git-shell">
|
---|
| 315 | <primary sortas="b-git-shell">git-shell</primary>
|
---|
| 316 | </indexterm>
|
---|
| 317 | </listitem>
|
---|
| 318 | </varlistentry>
|
---|
| 319 |
|
---|
| 320 | <varlistentry id="git-upload-archive">
|
---|
| 321 | <term><command>git-upload-archive</command></term>
|
---|
| 322 | <listitem>
|
---|
| 323 | <para>is invoked by <command>git archive --remote</command> and sends
|
---|
| 324 | a generated archive to the other end over the git protocol.</para>
|
---|
| 325 | <indexterm zone="git git-upload-archive">
|
---|
| 326 | <primary sortas="b-git-upload-archive">git-upload-archive</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
| 330 |
|
---|
| 331 | <varlistentry id="git-upload-pack">
|
---|
| 332 | <term><command>git-upload-pack</command></term>
|
---|
| 333 | <listitem>
|
---|
| 334 | <para>is invoked by <command>git fetch-pack</command>, it discovers
|
---|
| 335 | what objects the other side is missing, and sends them after
|
---|
| 336 | packing.</para>
|
---|
| 337 | <indexterm zone="git git-upload-pack">
|
---|
| 338 | <primary sortas="b-git-upload-pack">git-upload-pack</primary>
|
---|
| 339 | </indexterm>
|
---|
| 340 | </listitem>
|
---|
| 341 | </varlistentry>
|
---|
| 342 | </variablelist>
|
---|
| 343 | </sect2>
|
---|
| 344 | </sect1>
|
---|