The Go Blog

git install on centos 7

bantana
21 October 2016

git clone https://github.com/git/git.git

$ cd $HOME/repos/
$ git clone https://github.com/git/git.git

preinstall

$ sudo yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
$ sudo yum install expat-devel libcurl-devel openssl-devel

install from source

$ cd git
$ make configure
$ ./configure --prefix=$HOME/.tools/git
$ make && make install

.bash_profile

if [ -d $HOME/.tools/git ]; then
  PATH=$HOME/.tools/git/bin:$PATH
fi

Related articles