How to Install Git and Setup Git Account in RHEL, CentOS and Fedora
=========
For newbies,Gitis a free and open source, fast and distributed version control system (VCS), which by design is based on speed, efficient performance and data integrity to support small-scale to extensive software development projects.
Git is a software repository that allows you to keep a track of your software changes, revert to previous version and create another versions of files and directories.
Git is written inC, with a mix ofPerland a variety of shell scripts, it’s primarily intended to run on the Linux kernel and has a number of remarkable features as listed below:
1. Easy to learn
2. It is fast and most of its operations are carried out locally, in addition, this offers it a tremendous speed on centralized systems that need to communicate with remote servers.
3. Highly efficient
4. Supports data integrity checks
5. Enables cheap local branching
6. Offers a convenient staging area
7. It also maintains multiple work-flows together with many others
In this how-to guide, we shall move through the necessary steps of installingGitonCentOS/RHEL 7/6andFedora 20-24Linux distributions along with how to configureGitso that you can start participating right away..
### Install Git Using Yum
We shall installGitfrom the system default repositories, and make sure that your system is up-to-date with the latest version of packages by running the[YUM package manager][8]update command below:
```
# yum update
```
Next, installGitby typing the following command:
```
# yum install git
```
After git successfully installed, you can issue the following command to display the version of Git installed:
Important: InstallingGitfrom default repositories will give you older version. If you looking to have a most recent version of Git, consider compiling from source using following instructions.
### Install Git from Source
Before you begin, first you need to install required software dependencies from the default repositories, along with the utilities that needed to build a binary from source:
After you have installed required software dependencies, go to the official[Git release page][6]and grab the latest version and compile it from source using following series of command:
**Suggested Read:**[11 Best Git Clients and Git Repository Viewers for Linux][4]
### Set Up Git Account in Linux
In this section, we shall cover how to set up a Git account with correct user information such asnameandemail addressto avoid any commit errors, and the`git config`command is used to do that.
Important: Make sure to replaceusernamewith the actual name for the Git user to be created and used on your system.
You can start by creating a Git user with the[useradd command][3]as below, where the`-m`flag used to create the user’s home directory under`/home`and`-s`specifies the user’s default shell.
```
# useradd -m -s /bin/bash username
# passwd username
```
Now, add the new user to the wheel group to enable the account to use the`sudo`command:
```
# usermod username -aG wheel
```
[![Create Git User Account](http://www.tecmint.com/wp-content/uploads/2016/10/Create-Git-User-Account.png)][2]
Now verifyGitconfiguration using following command.
```
$ sudo git config --list
```
If there are no errors with the configurations, you should be able to view an output with the following details:
```
user.name=username
user.email= username@some-domian.com
```
[![Setup Git Account in Linux](http://www.tecmint.com/wp-content/uploads/2016/10/Setup-Git-Account.png)][1]
>Setup Git Account in Linux
##### Conclusion
In this simple tutorial, we have looked at how to install Git on your Linux system as well as configuring it. I believe the instructions are easy to follow, however, to get in touch with us for any questions or suggestions you can make use of the reaction section below.