{"id":5063,"date":"2020-04-29T10:05:23","date_gmt":"2020-04-29T14:05:23","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=5063"},"modified":"2020-04-29T12:37:40","modified_gmt":"2020-04-29T16:37:40","slug":"how-to-install-git-on-centos-8","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/","title":{"rendered":"How to Install Git On CentOS 8"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"628\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg\" alt=\"How to install git on Centos 8.\" class=\"wp-image-5064\" srcset=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg 1200w, https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8-573x300.jpg 573w, https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8-768x402.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>Version control system records each and every change of a file of set or file over time so that you can download a specific version later. If you have modified a file and it causes a problem, you can easily revert the selected file back to a previous state. This will speed up your software development process and also save lots of time.<\/p>\n\n\n\n<p>Git is an open-source and most widely used distributed version control system developed by Linux Torvalds. It is specially designed to handle small to very large projects with speed and efficiency. It is used to store multiple versions of a file in a local or remote repository and also used to track every change made by users.<\/p>\n\n\n\n<p>In this tutorial, we will explain how to install Git on <a href=\"https:\/\/www.centos.org\/\">CentOS 8<\/a>.<\/p>\n\n\n\n<p><strong>Requirements<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A <a href=\"https:\/\/www.globo.tech\/dedicated-server-hosting\">server<\/a> running CentOS 8<\/li><li>Root access for the <a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\">server<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Install Git From the Repository<\/h2>\n\n\n\n<p>The simple and easiest way to install Git is to install it from the repository.<\/p>\n\n\n\n<p>Open your terminal interface and run the following command to install Git on your system.<\/p>\n\n\n\n<p><code> dnf install git -y<\/code><\/p>\n\n\n\n<p>Once the installation is finished, verify the Git version using the following command:<\/p>\n\n\n\n<p><code> git --version<\/code><\/p>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> git version 2.18.2<\/pre>\n\n\n\n<br class=\"custom-break\">\n\n\n\n<p>You can also remove the Git from your system using the following command:<\/p>\n\n\n\n<p><code> dnf remove git<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/Remove-Git-Centos8.png\" alt=\" Result from &quot;dnf remove git&quot; command.\" class=\"wp-image-5066\" width=\"968\" height=\"284\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Install Git From the Source<\/h2>\n\n\n\n<p>Installing Git from the source is a good option for you if you want to install a specific version of Git in your system.<\/p>\n\n\n\n<p>First, you will need to install some required packages to build Git from the source. You can install all of them with the following commands:<\/p>\n\n\n\n<p><code> dnf groupinstall \"Development Tools\"<br>\ndnf install wget unzip gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel libcurl-devel expat-devel -y<\/code><\/p>\n\n\n\n<p>Once all the packages are installed, go to the <a href=\"https:\/\/github.com\/git\/git\/releases\">Git download page<\/a> as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/Git-downlaod-webpage.png\" alt=\"Git download home page.\" class=\"wp-image-5067\" width=\"942\" height=\"497\"\/><\/figure>\n\n\n\n<p>Next, download the latest version of the Git using the following command:<\/p>\n\n\n\n<p><code> wget https:\/\/github.com\/git\/git\/archive\/v2.26.0.tar.gz<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/wget-git-Centos8.png\" alt=\"Result from download of git package using wget command.\" class=\"wp-image-5068\" width=\"956\" height=\"223\"\/><\/figure>\n\n\n\n<p>Once the download is completed, extract the downloaded file with the following command:<\/p>\n\n\n\n<p><code> tar -xvzf v2.26.0.tar.gz<\/code><\/p>\n\n\n\n<p>Next, change the directory to the extracted directory and install it with the following command:<\/p>\n\n\n\n<p><code> cd git-2.26.0<br>\n make prefix=\/usr all<br>\n make prefix=\/usr install<\/code><\/p>\n\n\n\n<p>Once installed, you should see the following screen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/Install-git-using-make-Centos8.png\" alt=\"Result after git installation using make command on CentOS 8.\" class=\"wp-image-5071\" width=\"973\" height=\"490\"\/><\/figure>\n\n\n\n<p>You can now verify the installed version of Git using the following command:<\/p>\n\n\n\n<p><code> git --version<\/code><\/p>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> git version 2.26.0<\/pre>\n\n\n\n<br class=\"custom-break\">\n\n\n\n<p>You can also see Git help page using the following command:<\/p>\n\n\n\n<p><code> git \u2013help<\/code><\/p>\n\n\n\n<p>You should see the following screen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/Git-help-output.png\" alt=\"Git --help command output.\" class=\"wp-image-5072\" width=\"831\" height=\"715\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Configure Git<\/h2>\n\n\n\n<p>At this point, Git is installed in your system. Next, you will need to configure it with your correct information.<\/p>\n\n\n\n<p>You can configure your global username and email address using the following command:<\/p>\n\n\n\n<p><code> git config --global user.name \"Your Name\"<br>\n git config --global user.email \"Your-Email@globo.tech\"<\/code><\/p>\n\n\n\n<p>Next, list your configured information with the following command:<\/p>\n\n\n\n<p><code> git config --list<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">You should get the following output:<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"> user.name=Your Name\n user.email=Your-Email@globo.tech<\/pre>\n\n\n\n<br class=\"custom-break\">\n\n\n\n<p>By default, Git stores all information in ~\/.gitconfig file. You can see it with the following command:<\/p>\n\n\n\n<p><code> cat ~\/.gitconfig<\/code><\/p>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> [user]\n       name = Your Name\n       email = Your-Email@globo.tech<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Congratulations! you should now know how to install Git on CentOS 8. To learn more about how to use, visit the Git documentation at <a href=\"https:\/\/git-scm.com\/doc\">Git doc<\/a>.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":5064,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5063","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Git On CentOS 8 - Globo.Tech<\/title>\n<meta name=\"description\" content=\"Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Git On CentOS 8 - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-29T14:05:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-29T16:37:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/\",\"name\":\"How to Install Git On CentOS 8 - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg\",\"datePublished\":\"2020-04-29T14:05:23+00:00\",\"dateModified\":\"2020-04-29T16:37:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#primaryimage\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg\",\"contentUrl\":\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg\",\"width\":1200,\"height\":628,\"caption\":\"How to install Git on CentOS 8\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Git On CentOS 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Git On CentOS 8 - Globo.Tech","description":"Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Git On CentOS 8 - Globo.Tech","og_description":"Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8","og_url":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/","og_site_name":"Globo.Tech","article_published_time":"2020-04-29T14:05:23+00:00","article_modified_time":"2020-04-29T16:37:40+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg","type":"image\/jpeg"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/","url":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/","name":"How to Install Git On CentOS 8 - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#primaryimage"},"image":{"@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#primaryimage"},"thumbnailUrl":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg","datePublished":"2020-04-29T14:05:23+00:00","dateModified":"2020-04-29T16:37:40+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"Git is a distributed version-control system, used for tracking changes in source code during software development. Learn how to install git on CentOS 8","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#primaryimage","url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg","contentUrl":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2020\/04\/install-git-on-centos8.jpg","width":1200,"height":628,"caption":"How to install Git on CentOS 8"},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/how-to-install-git-on-centos-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to Install Git On CentOS 8"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/5063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=5063"}],"version-history":[{"count":13,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/5063\/revisions"}],"predecessor-version":[{"id":5087,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/5063\/revisions\/5087"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media\/5064"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=5063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=5063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=5063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}