Git is an open source software used for version control.
Before installing Git, it is important to set the environment and dependencies. The following command will install all the dependencies needed for Git.
# yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel
Downloading and Installing Git
Change to a convenient directory (/usr/local/ or /usr/local/src)
# wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
# tar xvzf git-latest.tar.gz
# cd git-date
# autoconf
# ./configure --with-curl=/usr/local
# make
# make install
The installation is completed now. But we need to do a bit of testing as well.
# cd mkdir git-test
# cd git-test
# git init
Here, we created a test directory called “git-test", entered into that directory and initialized a repository there. If everything works fine, you will get a message as said below.
Before installing Git, it is important to set the environment and dependencies. The following command will install all the dependencies needed for Git.
# yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel
Downloading and Installing Git
Change to a convenient directory (/usr/local/ or /usr/local/src)
# wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
# tar xvzf git-latest.tar.gz
# cd git-date
# autoconf
# ./configure --with-curl=/usr/local
# make
# make install
The installation is completed now. But we need to do a bit of testing as well.
# cd mkdir git-test
# cd git-test
# git init
Here, we created a test directory called “git-test", entered into that directory and initialized a repository there. If everything works fine, you will get a message as said below.
Code:
Initialized empty Git repository in /root/git-test/.git/