Git is in today's software development industry a very useful tool for version control. I've been using Git.
What is Git?
If you've ever used a site like Github or bought Bitbucket code, show it to your friends, then you probably know what Git Yes. At least, you must have had to understand it.
Git version control system is the most widely used software development, which was originally released nine years ago on April 7, 2005, mainly to ensure the smooth progress of a large-scale distributed development projects. And client - server systems development is different, independent developer of network access or a central server, because each Git working directory is a comprehensive database.
Founder Linus Torvalds decided to follow the terms of the agreement of the second edition of the GNU General Public License, a free publication Git. Wikipedia can learn that there are many languages that are developing a version control system, such as Perl, Bash, C and Tcl.
On GentOS7 before you install Git, I must explicitly Git supports major operating systems such as Linux, POSIX, Windows, and OS X.
Be sure to install on your machine have CentOS 7 system, and an account with root privileges. Because we need to install software on the system.
Install Git - compiling from source
From source code to compile and install the software is not difficult, but it certainly requires some knowledge, I strongly recommend carefully follow each step of the tutorial, especially if you have not done so before.
This approach allows us to get the latest features included in the latest version, but the disadvantage of this approach is that once the installation is complete is being used in the system CentOS yum package manager can not be updated
Because there are dependencies between some packages, we must you must manually install some software before installation can proceed. So we can open CentOS7 terminal, run the following command.
Get root privileges
Use the following command
sudo yum install "Development Tools"
If the above command is not executed, you can use the following command to solve this problem.
yum groupinstall "Development Tools"
Select Y and press Enter.
Then run the following command to install the tutorial needs some other packages.
sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
Once dependence has been installed then we need to find and download the latest version of Git software. The screenshot below shows, we can get the latest version of the page information.
As you can see from the screenshot above, the latest version is V2.3.0. Do not download with -rc, because it represents a release candidate.
By using the tool wget to download version 2.3.0 of Git.
Then use tar tool to extract the .tar archive file you just downloaded.
tar xvf v2.3.0.tar.gz
Then use the cd command to change the working directory, as shown below.
cd Git *
Once we have the source folder, we can begin the installation. Run the following command.
You will see a display similar to the screenshot below.
We can now execute make install commands to complete Git on CentOS machine software installation.
After running the above command, be patient. Because it will take some time to complete the installation. You can run the following command to verify whether the installation was successful.
If the above command is executed, then the installation was successful.
Install Git - use the package manager
The easiest way is to install Git on CentOS use the yum package manager. The following command will help Git software you have installed.
sudo yum install Git