If you already have an previous version of Git installed, you can clone the latest version:
git clone https://github.com/git/git.git cd git
Now, we can actually build
By default Git will be installed onto
~/bin. Now we install it.
If the folder doesn't exist, it will be created. The only thing we need to do now is make sure that
~/bin exists in your
echo $PATH /home/ruben/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
If it doesn't, you can add it.
Replace nano with whichever editor you want. At the end add:
To exit nano
If you want to change where Git is installed to, for example, maybe
/home/ruben/opt, we can substitute the make step with:
ruben with your username. This should work for everyone:
For extra options, there's an
INSTALL inside the Git folder.