Facebook X (Twitter) Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook X (Twitter) Instagram
    TecAdmin
    You are at:Home»Opensource»How to Install Git 1.9 on CentOS/RHEL 7/6 & Fedora 27/26

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

    By RahulDecember 20, 20172 Mins Read

    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
    

    git git client git client setup git on centos git on linux how to git install git setup git
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Git Restore: Functionality and Practical Examples

    Git Switch: Functionality and Practical Examples

    Git Switch vs. Checkout: A Detailed Comparison with Examples

    Git Switch vs. Checkout: A Detailed Comparison with Examples

    View 12 Comments

    12 Comments

    1. Petar on March 23, 2017 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).

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

      wonderful, thanks for the article.

      Reply
    3. luna on December 2, 2014 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.

      Reply
    4. paskuale on September 25, 2014 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

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

      @Jason

      first read, then understand, then write

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

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

      “bash: /etc/bashrc: Permission denied”

      Reply
      • paskuale on September 25, 2014 12:14 am

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

        Reply
    7. Balaji on July 30, 2014 7:56 am

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

      Reply
    8. Vaidya on April 26, 2014 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

      Reply
      • JaqFlash on May 16, 2014 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

        Reply
    9. Nikolay Dobromirov on February 28, 2014 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

      Reply
      • Rahul on February 28, 2014 12:20 pm

        Thanks Nikolay.
        We have updated article accordingly.

        Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Using .env Files in Django
    • Using .env File in FastAPI
    • Setting Up Email Notifications for Django Error Reporting
    • How to Enable Apache Rewrite (mod_rewrite) Module
    • What are Microservices?
    Facebook X (Twitter) Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.