mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-29 10:52:14 +08:00
32696a4c89
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11039 af4574ff-66df-0310-9fd7-8a98e5e911e0
418 lines
14 KiB
XML
418 lines
14 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY git-download-http "http://git-core.googlecode.com/files/git-&git-version;.tar.gz">
|
|
<!ENTITY git-download-ftp " ">
|
|
<!ENTITY git-md5sum "60f32ef4a6b3fa2143b81a28704333ed">
|
|
<!ENTITY git-size "4.2 MB">
|
|
<!ENTITY git-buildsize "200 MB">
|
|
<!ENTITY git-time "3.3 SBU (including tests)">
|
|
]>
|
|
|
|
<sect1 id="git" xreflabel="git-&git-version;">
|
|
<?dbhtml filename="git.html"?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>Git-&git-version;</title>
|
|
|
|
<indexterm zone="git">
|
|
<primary sortas="a-Git">Git</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to Git</title>
|
|
|
|
<para>
|
|
<application>Git</application> is a free and open source, distributed
|
|
version control system designed to handle everything from small to very
|
|
large projects with speed and efficiency. Every
|
|
<application>Git</application> clone is a full-fledged repository with
|
|
complete history and full revision tracking capabilities, not dependent on
|
|
network access or a central server. Branching and merging are fast and easy
|
|
to do. <application>Git</application> is used for version control of files,
|
|
much like tools such as <application>Mercurial</application>,
|
|
<application>Bazaar</application>, <xref linkend="subversion"/>,
|
|
<xref linkend="cvs"/>, <application>Perforce</application>, and
|
|
<application>Team Foundation Server</application>.
|
|
</para>
|
|
|
|
&lfs72_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&git-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&git-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &git-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &git-size;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated disk space required: &git-buildsize;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated build time: &git-time;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
<ulink url="http://git-core.googlecode.com/files/git-manpages-&git-version;.tar.gz">
|
|
http://git-core.googlecode.com/files/git-manpages-&git-version;.tar.gz</ulink>
|
|
(only needed if you've not installed asciidoc and xmlto)
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<ulink url="http://git-core.googlecode.com/files/git-htmldocs-&git-version;.tar.gz">
|
|
http://git-core.googlecode.com/files/git-htmldocs-&git-version;.tar.gz</ulink>
|
|
and other docs (only needed if you've not installed asciidoc).
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Git Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="curl"/> (needed to use <application>Git</application> over http,
|
|
https, ftp or ftps),
|
|
<xref linkend="expat"/>,
|
|
<xref linkend="openssl"/> and
|
|
<xref linkend="python2"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="pcre"/> and
|
|
<xref linkend="tk"/> (gitk, a simple <application>Git</application>
|
|
repository viewer, uses <application>Tk</application> at runtime)
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional (to create the man pages and html docs)</bridgehead>
|
|
<para>
|
|
<ulink url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> and
|
|
<xref linkend="xmlto"/>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
<ulink url="&blfs-wiki;/git"/>
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Git</title>
|
|
|
|
<para>
|
|
Install <application>Git</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
If you have installed <ulink
|
|
url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> you can
|
|
create the html version of the man pages and other docs:
|
|
</para>
|
|
|
|
<screen><userinput>make html</userinput></screen>
|
|
|
|
<para>
|
|
If you have installed <ulink
|
|
url="http://www.methods.co.nz/asciidoc/">AsciiDoc</ulink> and
|
|
<xref linkend="xmlto"/> you can create the man pages:
|
|
</para>
|
|
|
|
<screen><userinput>make man</userinput></screen>
|
|
|
|
<para>
|
|
To check the results, issue: <command>make test</command>.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem>
|
|
user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
|
|
|
<para>
|
|
If you created the man pages, install them as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install-man</userinput></screen>
|
|
|
|
<para>
|
|
If you created the html docs, install them as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make htmldir=/usr/share/doc/git-&git-version; install-html &&
|
|
mkdir -p /usr/share/doc/git-&git-version;/man-pages/{html,text} &&
|
|
mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &&
|
|
mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &&
|
|
mkdir /usr/share/doc/git-&git-version;/technical/{html,text} &&
|
|
mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &&
|
|
mv /usr/share/doc/git-&git-version;/technical/{*.,}html &&
|
|
mkdir /usr/share/doc/git-&git-version;/howto/{html,text} &&
|
|
mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &&
|
|
mv /usr/share/doc/git-&git-version;/howto/{*.,}html</userinput></screen>
|
|
|
|
<para>
|
|
Alternatively, If you downloaded the man pages untar them as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>tar -xf ../git-manpages-&git-version;.tar.gz -C /usr/share/man --no-same-owner</userinput></screen>
|
|
|
|
<para>
|
|
If you downloaded the html docs untar them as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>mkdir -p /usr/share/doc/git-&git-version;/man-pages/{html,text} &&
|
|
|
|
tar -xf ../git-htmldocs-&git-version;.tar.gz \
|
|
-C /usr/share/doc/git-&git-version; --no-same-owner &&
|
|
|
|
mv /usr/share/doc/git-&git-version;/{git*.txt,man-pages/text} &&
|
|
mv /usr/share/doc/git-&git-version;/{git*.,index.,man-pages/}html &&
|
|
mkdir /usr/share/doc/git-&git-version;/technical/{html,text} &&
|
|
mv /usr/share/doc/git-&git-version;/technical/{*.txt,text} &&
|
|
mv /usr/share/doc/git-&git-version;/technical/{*.,}html &&
|
|
mkdir /usr/share/doc/git-&git-version;/howto/{html,text} &&
|
|
mv /usr/share/doc/git-&git-version;/howto/{*.txt,text} &&
|
|
mv /usr/share/doc/git-&git-version;/howto/{*.,}html</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<option>--without-python</option>: Use this switch if
|
|
<application>Python</application> is not installed.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-libpcre</option>: Use this switch if
|
|
<application>PCRE</application> is installed.
|
|
</para>
|
|
|
|
<para>
|
|
<command>tar -xf ../git-manpages-&git-version;.tar.gz -C
|
|
/usr/share/man --no-same-owner</command>: This untars
|
|
<filename>git-manpages-&git-version;.tar.gz</filename>. The
|
|
<option>-C</option> option makes tar change directory to
|
|
<filename class="directory">/usr/share/man</filename> before
|
|
it starts to decompress the docs. The <option>--no-same-owner</option>
|
|
option stops tar from preserving the user and group details of the
|
|
files. This is useful as that user or group may not exist on your
|
|
system; this could (potentially) be a security risk.
|
|
</para>
|
|
|
|
<para>
|
|
<command>mv /usr/share/doc/git-&git-version; ...</command>: These
|
|
commands move some of the files into subfolders to make it easier to sort
|
|
through the docs and find what you're looking for.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring Git</title>
|
|
|
|
<sect3 id="git-config">
|
|
<title>Config Files</title>
|
|
<para>
|
|
<filename>~/.gitconfig</filename> and
|
|
<filename>/etc/gitconfig</filename>
|
|
</para>
|
|
|
|
<indexterm zone="git git-config">
|
|
<primary sortas="e-AA.gitconfig">~/.gitconfig</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="git git-config">
|
|
<primary sortas="e-etc-gitconfig">/etc/gitconfig</primary>
|
|
</indexterm>
|
|
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>
|
|
If you want to use <command>git svn</command> you will need to
|
|
install <xref linkend="subversion"/> and its Perl bindings.
|
|
</para>
|
|
|
|
<para>
|
|
To be able to use git to pull from a https source you need first install
|
|
the <xref linkend="cacerts"/> and then configure git to know where they
|
|
are. To set the default location of the SSL certificates, as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>git config --system http.sslCAPath /etc/ssl/certs</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
git, git-cvsserver, gitk, git-receive-pack, git-shell,
|
|
git-upload-archive and git-upload-pack
|
|
</seg>
|
|
<seg>
|
|
None
|
|
</seg>
|
|
<seg>
|
|
/usr/lib/git-core,
|
|
/usr/share/doc/git-&git-version;,
|
|
/usr/share/git-core,
|
|
/usr/share/git-gui,
|
|
/usr/share/gitk and
|
|
/usr/share/gitweb
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="git-prog">
|
|
<term><command>git</command></term>
|
|
<listitem>
|
|
<para>
|
|
is the stupid content tracker.
|
|
</para>
|
|
<indexterm zone="git git-prog">
|
|
<primary sortas="b-git">git</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="git-cvsserver">
|
|
<term><command>git-cvsserver</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a CVS server emulator for <application>Git</application>.
|
|
</para>
|
|
<indexterm zone="git git-cvsserver">
|
|
<primary sortas="b-git-cvsserver">git-cvsserver</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="gitk">
|
|
<term><command>gitk</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a graphical <application>Git</application> repository browser
|
|
(needs <xref linkend="tk"/>).
|
|
</para>
|
|
<indexterm zone="git gitk">
|
|
<primary sortas="b-gitk">gitk</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="git-receive-pack">
|
|
<term><command>git-receive-pack</command></term>
|
|
<listitem>
|
|
<para>
|
|
is invoked by <command>git send-pack</command> and updates the
|
|
repository with the information fed from the remote end.
|
|
</para>
|
|
<indexterm zone="git git-receive-pack">
|
|
<primary sortas="b-git-receive-pack">git-receive-pack</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="git-shell">
|
|
<term><command>git-shell</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a login shell for SSH accounts to provide restricted Git
|
|
access.
|
|
</para>
|
|
<indexterm zone="git git-shell">
|
|
<primary sortas="b-git-shell">git-shell</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="git-upload-archive">
|
|
<term><command>git-upload-archive</command></term>
|
|
<listitem>
|
|
<para>
|
|
is invoked by <command>git archive --remote</command> and sends
|
|
a generated archive to the other end over the git protocol.
|
|
</para>
|
|
<indexterm zone="git git-upload-archive">
|
|
<primary sortas="b-git-upload-archive">git-upload-archive</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="git-upload-pack">
|
|
<term><command>git-upload-pack</command></term>
|
|
<listitem>
|
|
<para>
|
|
is invoked by <command>git fetch-pack</command>, it discovers
|
|
what objects the other side is missing, and sends them after
|
|
packing.
|
|
</para>
|
|
<indexterm zone="git git-upload-pack">
|
|
<primary sortas="b-git-upload-pack">git-upload-pack</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|