Introduction to Git
Git 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
Git 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. Git is used for version control of files, much
like tools such as Mercurial,
Bazaar, Subversion-1.8.5,
CVS-1.11.23, Perforce, and Team
Foundation Server.
This package is known to build and work properly using an LFS-7.5
platform.
Package Information
-
Download (HTTP):
https://www.kernel.org/pub/software/scm/git/git-1.9.0.tar.xz
-
Download MD5 sum: 7debe72e09d6c725fd291d4d68c5f638
-
Download size: 3.3 MB
-
Estimated disk space required: 218 MB (additional 13 MB with
downloaded docs or man pages, or 23 MB building docs and man
pages)
-
Estimated build time: 0.7 SBU (additional 7.7 SBU for tests
or 2.6 SBU for docs and man creation)
Additional Downloads
Git Dependencies
Recommended
cURL-7.35.0 (needed to use Git over http, https, ftp or ftps), expat-2.1.0,
OpenSSL-1.0.1f and Python-2.7.6
Optional
PCRE-8.34,
Subversion-1.8.5 with Perl bindings (for
git svn), and
Tk-8.6.1 (gitk,
a simple Git repository viewer,
uses Tk at runtime)
Optional (to create the man pages and html docs)
AsciiDoc and xmlto-0.0.25
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/git
Installation of Git
Install Git by running the
following commands:
./configure --prefix=/usr \
--with-gitconfig=/etc/gitconfig &&
make
If you have installed AsciiDoc you can create
the html version of the man pages and other docs:
make html
If you have installed AsciiDoc and xmlto-0.0.25 you can create the man pages:
make man
To check the results, issue: make
test.
Now, as the root
user:
make install
If you created the man pages, install them as the root
user:
make install-man
If you created the html docs, install them as the root
user:
make htmldir=/usr/share/doc/git-1.9.0 install-html &&
mkdir -p /usr/share/doc/git-1.9.0/man-pages/{html,text} &&
mv /usr/share/doc/git-1.9.0/{git*.txt,man-pages/text} &&
mv /usr/share/doc/git-1.9.0/{git*.,index.,man-pages/}html &&
mkdir /usr/share/doc/git-1.9.0/technical/{html,text} &&
mv /usr/share/doc/git-1.9.0/technical/{*.txt,text} &&
mv /usr/share/doc/git-1.9.0/technical/{*.,}html &&
mkdir /usr/share/doc/git-1.9.0/howto/{html,text} &&
mv /usr/share/doc/git-1.9.0/howto/{*.txt,text} &&
mv /usr/share/doc/git-1.9.0/howto/{*.,}html
Alternatively, If you downloaded the man pages untar them as the
root
user:
tar -xf ../git-manpages-1.9.0.tar.xz -C /usr/share/man --no-same-owner --no-overwrite-dir
If you downloaded the html docs untar them as the root
user:
mkdir -p /usr/share/doc/git-1.9.0/man-pages/{html,text} &&
tar -xf ../git-htmldocs-1.9.0.tar.xz \
-C /usr/share/doc/git-1.9.0 --no-same-owner --no-overwrite-dir &&
find /usr/share/doc/git-1.9.0 -type d -exec chmod 755 {} \; &&
find /usr/share/doc/git-1.9.0 -type f -exec chmod 644 {} \; &&
mv /usr/share/doc/git-1.9.0/{git*.txt,man-pages/text} &&
mv /usr/share/doc/git-1.9.0/{git*.,index.,man-pages/}html &&
mkdir /usr/share/doc/git-1.9.0/technical/{html,text} &&
mv /usr/share/doc/git-1.9.0/technical/{*.txt,text} &&
mv /usr/share/doc/git-1.9.0/technical/{*.,}html &&
mkdir /usr/share/doc/git-1.9.0/howto/{html,text} &&
mv /usr/share/doc/git-1.9.0/howto/{*.txt,text} &&
mv /usr/share/doc/git-1.9.0/howto/{*.,}html
Command Explanations
--with-gitconfig=/etc/gitconfig
: This
sets /etc/gitconfig
as the file that
stores the default, system wide, Git settings.
--without-python
: Use this switch if
Python is not installed.
--with-libpcre
: Use this switch if
PCRE is installed.
tar -xf ../git-manpages-1.9.0.tar.gz
-C /usr/share/man --no-same-owner: This untars
git-manpages-1.9.0.tar.gz
. The
-C
option makes tar change directory to
/usr/share/man
before it starts to
decompress the docs. The --no-same-owner
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.
mv /usr/share/doc/git-1.9.0
...: 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.
find ... chmod ...:
These commands correct the permissions in the shipped documentation
tar file.
--libexecdir=/usr/lib
: This option puts
the git-core
directory in
/usr/lib
instead of /usr/libexec
in accordance with the old version
of the FHS used before LFS-7.5.