• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Git 1.9 on CentOS/RHEL 7/6 & Fedora 27/26

Written by Rahul, Updated on December 20, 2017
Opensource git, git client, git client setup, git on centos, git on linux, how to git, install git, setup git

Git has released 1.9.5 version on Dec 18, 2014. Git is a free and open source distributed version control system. It is designed to handle a small to very large projects with speed and efficiency. To know more about Git 1.9.5 read Git release notes. This article will guide you to install Git 1.9.5 on CentOS/RHEL 7/6, Fedora 27,26 Systems using the source code. To learn about Git, access Git console on your browser and know about its uses.

git-large-imge

Use this tutorial for installing latest Git on your Redhat based systems.

Step 1 – Install Required Packages

Before compiling Git from source code, make sure you have installed required packages on your system or Use the following command to install it.

yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

Step 2 – Download and Compile Git Source

Download latest Git source code from Git google code or simply use following command to download Git 1.9.5.

cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-1.9.5.tar.gz
tar xzf git-1.9.5.tar.gz

After downloading and extracting Git source code, Use the following command to compile the source code.

cd git-1.9.5
make prefix=/usr/src/git all
make prefix=/usr/src/git install
echo "export PATH=$PATH:/usr/src/git/bin" >> /etc/bashrc
source /etc/bashrc

Step 3 – Check Git Version

Upon completion of above steps, you have successfully install Git in your system. Let use following command to check git version

git --version

git version 1.9.5

Share it!
Share on Facebook
Share on Twitter
Share on Google+
Share on Reddit
Share on Tumblr
Rahul
Rahul
Connect on Facebook Connect on Twitter Connect on Google+

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Related Posts

  • How to Rename Local and Remote Git Branch

    February 5, 2019
  • How to Install Gitlab Server on Ubuntu 18.04 & 16.04 LTS

    September 1, 2017
  • How to Setup Commit Username and Email for Git

    June 27, 2017
  • How to Delete Commit History in Github

    March 15, 2017
  • How to List Remote Branches in Git

    September 9, 2016

12 Comments

  1. Petar Reply to Petar
    March 23, 2017 at 4:10 pm

    Hi, I tried to install git 1.9.1 version according to the steps from above on CentOs 6 32bit on virtualBox. At the end when I tried to run git –version I got error message: – bash: command git not found. I tried the last two commands with sudo command, but nothing change.
    echo “export PATH=$PATH:/usr/local/git/bin” >> /etc/bashrc
    source /etc/bashrc
    I don’t know what ‘source’ command is doing, and I don’t know why I don’t get the wrong result at the end. On the previous steps, I don’t get any visible error(s).

  2. dilip Reply to dilip
    December 24, 2015 at 6:39 am

    wonderful, thanks for the article.

  3. luna Reply to luna
    December 2, 2014 at 7:36 pm

    Hi, I followed your instructions but the version of git i get is 1.7.3.4… I am using a redHat 6.6.

  4. paskuale Reply to paskuale
    September 25, 2014 at 12:06 am

    Great article, u save me lot of time, on aruba cloud centos !! Yum get me git_1.7.1 very old !!! with this article I installed git_2.1.1 😉 thanks

  5. ros Reply to ros
    August 29, 2014 at 12:24 am

    @Jason

    first read, then understand, then write

  6. Jason Reply to Jason
    August 27, 2014 at 12:19 pm

    “#echo “export PATH=$PATH:/usr/local/git/bin” >> /etc/bashrc” gives:

    “bash: /etc/bashrc: Permission denied”

    • paskuale Reply to paskuale
      September 25, 2014 at 12:14 am

      sudo before #echo…. superuser have all permissions ! 😉

  7. Balaji Reply to Balaji
    July 30, 2014 at 7:56 am

    Thanks for this post!!!. Works like a charm.

  8. Vaidya Reply to Vaidya
    April 26, 2014 at 12:42 am

    Thanks for the tutorial.

    Can you please post instructions on how to upgrade existing git as well. I have git 1.7.1 installed in centos 6.5 (/usr/bin/git). I want to replace that version with 1.9.0

    Thanks

    • JaqFlash Reply to JaqFlash
      May 16, 2014 at 4:55 pm

      Vaidya, I had a similar issue.

      I found that simply running “yum remove git” took the factory fitted 1.7.1 off the system.

      After that when I ran “git –version” it automatically showed version 1.9.0

  9. Nikolay Dobromirov Reply to Nikolay
    February 28, 2014 at 10:26 am

    Thanks for the tutorial.
    As my environment was very clean, I was missing 2 dependencies required for the compilation on cent os 6.5.
    You can add them in step 1: gcc and perl-ExtUtils-MakeMaker

    • Rahul Rahul Reply to Rahul
      February 28, 2014 at 12:20 pm

      Thanks Nikolay.
      We have updated article accordingly.

Leave a Reply

Cancel reply

Popular Posts

  • How To Install Zabbix Agent on Debian 9/8
  • How to Install and Configure Squid Proxy on Debian 9
  • How To Install Wine 3 on Debian 9 (Stretch)
  • How to Remove “public/index.php” from URL in Laravel
  • How to Install Swift on Ubuntu 18.04 LTS
All rights reserved. © 2013-2018 TecAdmin.net. This site uses cookies. By using this website you agree our term and services