How to Install Git on CentOS 6

Source: Internet
Author: User
Tags version control system ruby on rails

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.