Using apt-get install
Use the below command on your ubuntu terminal:
$ sudo apt-get install git
Installation from source code
But at times you want to install a particular version of GIT for reasons. Follow the below to do that:
sudo apt-get install libcurl4-openssl-dev build-essential autoconf git clone https://github.com/git/git cd git git checkout v2.1.2 make configure ./configure with-openssl make prefix=/usr/local all sudo make prefix=/usr/local install ** Errors You May Find During Installation: * tclsh failed; using unoptimized loading MSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127 make: *** [all] Error 2 Solution: sudo apt-get install gettext
The above steps will install git version 2.1.2 in your system.
Leave a Reply