Introduction
Git is an open source, distributed version control System (VCS). It ' s commonly used for source code management (SCM), with sites like GitHub offering a social coding experience, and Popul AR projects such as Perl, Ruby on Rails, and the Linux kernel using it.
Pre-Flight Check
These instructions is intended for installing Git on CentOS 6.
I ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I'll be logged in as root.
If you ' re using the CentOS 5, then refer-tutorial on installing git from source on CentOS 5.
Installation
First, you'll follow a simple best practice:ensuring the existing packages is up to date before installing anything new.
Yum Update
Then it's a matter of just running one command for installation via Yum:
Yum Install git
You'll be asked to confirm the download and installation; Simply enter Y to confirm. Once This command was complete, GIT would be installed and ready to use!
As of the writing of this tutorial, the current version of Git available in the Liquid Web yum repositories is:git Versio N 1.7.1. You can check the version of Git that is installed by using the following command:
Git--version
Configuration
To prevent any commit errors, it's a good idea to setup your the user for git. We'll setup the user testuser with the e-mail address [email protected].
git config--global user.name "testuser" (set user name for Ervery repository)
git config--global user.email "[Email protected]"
Next We ll verify the configuration changes by viewing the. Gitconfig. Since been roaming around your server ' s file system before starting this tutorial, use the CD command to Retu RN to your home directory:
Cd
And then view the. Gitconfig:
Cat. Gitconfig
You can also view the same details of your configuration by using the following command:
git config--list
Be sociable, share!
How to Install Git on CentOS 6