How To install Git on Linux CentOS 7

Git is a widely-used source code management system for software development. Version control systems like Git allow you to keep track of your software at the source level. You can track changes, revert to previous stages, and branch off from the base code to create alternative versions of files and directories. To be able to install Git you need to have the sudo privilege. We will use yum package manager, to search for and install the latest git package available.

sudo yum install git
to check the installed version run the following command:
git --version
Next step is to setup the Git.
  • i assume you already have a GitHub account created. If not go ahead and create one at GitHub.
To configure the Git account on your Linux box ou will need to use the git command with the option config.
<code langs="">git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Check that the configuration have been saved by running the following command:
[root@aodba]# git config --list
user.name=XXXXX
user.email=XXXXXXXXXXX
Now Git is installed and ready to use.