Let’s get into using some Git. First things first—you have to install it. You can get it a number of ways; the two major ones are to put in it from source or to put in an existing package for your platform.
Installing from Source
If you can, it’s generally useful to put in Git from source, because you’ll get the foremost recent version.Each version of Git tends to incorporate useful UI enhancements, so getting the newest version is usually the simplest route if you are feeling comfortable compiling software from source.
It is also the case that a lot of Linux distributions contain very old packages; so unless you’re on a really up-to-date distro or are using backports, installing from source could also be the best bet.
To install Git, you would like to possess the subsequent libraries that Git depends on: curl, zlib, openssl, expat, and libiconv.
if you’re on a system that has yum (such as Fedora) or apt-get (such as a Debian based system), you can use one of these commands to install all of the dependencies:
$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel $ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
When you have all the necessary dependencies, you can go ahead and grab the latest snapshot from the Git web site:
Download Git :-Then, compile and install:
$ tar -zxf git-22.214.171.124.tar.gz
$ cd git-126.96.36.199
$ make prefix=/usr/local all
$ sudo make prefix=/usr/local install
After this is done, you can also get Git via Git itself for updates:
$ git clone git://git.kernel.org/pub/scm/git/git.git
Git Installing on Linux
If you want to install Git on Linux via a binary installer, you can generally do so through the basic packagemanagement tool that comes with your distribution.
If you’re on Fedora, you can use yum:
$ yum install git
Or if you’re on a Debian-based distribution like Ubuntu, try apt-get:
$ apt-get install git
Git Installing on Mac
This is easy ways to install Git on a Mac. The easiest is to use the graphical Git installer, which you can download from the Link.
Git Installing on Windows
Installing Git on Windows is very easy. The msysGit project has one of the easier installation procedures. Simply download the installer exe file from the GitHub page, and run it:
After it’s installed, you’ve got both a command-line version (including an SSH client which will are available handy later) and the standard GUI.Note on Windows usage: you ought to use Git with the provided msysGit shell (Unix style), it allows to use the complex lines of command given in this book.
If you would like , for a few reason, to use the native Windows shell / instruction
you have to use double quotes instead of single quotes (for parameters with spaces in them) and you must quote the parameters ending with the circumflex accent (^) if they’re last on the road , because it may be a continuation symbol in Windows.
If you like this post, don’t forget to share 🙂