{{tag>git guide compile development}} {{howhard>2}}
====== git ======
===== Goal =====
Compile the latest git, this guide assumes you are using the eSG provided installation. 

==== Steps ====
=== Library Prerequisites ===
<sxh>
yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
</sxh>

==== EXPORTS used to set versions ====
You can change the values here to change compiled version.
<sxh>
GIT_VERSION=2.23.0
</sxh>

=== Fetch git ===
<sxh>
cd /usr/local
wget https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz
tar zxfv git-${GIT_VERSION}.tar.gz
cd git-${GIT_VERSION}
</sxh>

=== Build git ===
<sxh>
make prefix=/usr/local/git all
</sxh>

=== Install git ===
<sxh>
make prefix=/usr/local/git install
</sxh>

=== symlink to default locations (Warning) ===
<sxh>
ln -s /usr/local/git/bin/git /usr/bin/git
ln -s /usr/local/git/bin/git-shell /usr/bin/git-shell
ln -s /usr/local/git/bin/git-receive-pack /usr/bin/git-receive-pack
ln -s /usr/local/git/bin/git-upload-archive /usr/bin/git-upload-archive
ln -s /usr/local/git/bin/git-upload-pack /usr/bin/git-upload-pack
</sxh>