How to Install and Configure Git on Fedora 22

By | September 21, 2015

Introduction

Git is a popular open source version control system (VCS). It is widely used for source code management (SCM), by sites like GitHub, which adds a social aspect to coding and makes software development much more easily collaborative . Other projects that use Git are famous names like “Perl”, “Ruby on Rails”, and the “Linux Kernel.”

Please Note:

– These instructions are written for the installation of Git on Fedora 22.

– I will be using a bodHOST Self Managed Fedora 22 server, and I will be logged in as root.

If you are using CentOS 7, please refer to this link – Installing Git on CentOS 7.

Installation Instructions

Before anything else, make sure that the existing packages are updated to the latest versions, before you install anything new. It is a good idea to make a habit of this.

“dnf -y update”

Now, run this command installation command using yum:

“dnf -y install git”

After this step is completed, Git will be ready to use.

Please Note: At the time of this writing, the latest version of Git that was available in the bodHOST dnf repositories was version 2.1.0. If you want to find out the version that is currently installed, use the command below.

“git –version”

Configuration

In order to prevent any errors, it is a good idea to to setup your user for Git by using the “-gobal” option, which will tell you the global configuration settings.

“git config –global user.name “testuser”

“git config –global user.email “[email protected]

Now, we will confirm our changes by looking at the “.gitconfig.”

“git config –list”

That’s it.