{"id":7884,"date":"2019-01-12T04:55:10","date_gmt":"2019-01-12T04:55:10","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=7884"},"modified":"2019-01-12T04:55:10","modified_gmt":"2019-01-12T04:55:10","slug":"how-to-install-git-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/12\/how-to-install-git-on-ubuntu-18-04\/","title":{"rendered":"How to install Git on Ubuntu 18.04"},"content":{"rendered":"<div class=\"td-post-featured-image\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"entry-thumb lazyloading td-animation-stack-type0-2\" title=\"How to install Git on Ubuntu 18.04\" src=\"https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/How-to-install-Git-on-Ubuntu-18.04.jpg\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" srcset=\"https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/How-to-install-Git-on-Ubuntu-18.04.jpg 750w, https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/How-to-install-Git-on-Ubuntu-18.04-300x140.jpg 300w\" alt=\"How to install Git on Ubuntu 18.04\" width=\"750\" height=\"350\" data-was-processed=\"true\" \/><figcaption class=\"wp-caption-text\">How to install Git on Ubuntu 18.04<\/figcaption><\/figure>\n<\/div>\n<div id=\"toc_container\" class=\"toc_wrap_left no_bullets\">\n<p class=\"toc_title\">Contents<\/p>\n<ul class=\"toc_list\">\n<li><a href=\"https:\/\/linux4one.com\/how-to-install-git-on-ubuntu-18-04\/#Prerequisites\"><span class=\"toc_number toc_depth_1\">1<\/span>\u00a0Prerequisites<\/a><\/li>\n<li><a href=\"https:\/\/linux4one.com\/how-to-install-git-on-ubuntu-18-04\/#1_Install_Git_on_Ubuntu\"><span class=\"toc_number toc_depth_1\">2<\/span>\u00a01. Install Git on Ubuntu<\/a><\/li>\n<li><a href=\"https:\/\/linux4one.com\/how-to-install-git-on-ubuntu-18-04\/#2_Setting_Up_Git\"><span class=\"toc_number toc_depth_1\">3<\/span>\u00a02. Setting Up Git<\/a><\/li>\n<li><a href=\"https:\/\/linux4one.com\/how-to-install-git-on-ubuntu-18-04\/#Conclusion\"><span class=\"toc_number toc_depth_1\">4<\/span>\u00a0Conclusion<\/a><\/li>\n<\/ul>\n<\/div>\n<h2>Installing Git on Ubuntu<\/h2>\n<p>Git is the most popular version control system nowadays. It helps to share and collaborate on software development projects. It is mainly used for source code management. In this tutorial, you are going to learn how to install Git on Ubuntu 18.04.<\/p>\n<h3><span id=\"Prerequisites\">Prerequisites<\/span><\/h3>\n<p>Before you start installing Git on Ubuntu 18.04. You must have the non-root user account on your Server or Desktop with sudo privileges.<\/p>\n<h3><span id=\"1_Install_Git_on_Ubuntu\">1. Install Git on Ubuntu<\/span><\/h3>\n<p>To install Git in Ubuntu you need to update the apt package manager index then you will install it in Ubuntu. After that, you will confirm installation.<\/p>\n<p>To update apt package manager index type following in the terminal<\/p>\n<pre>sudo apt update<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<p>Now install Git in Ubuntu by typing<\/p>\n<pre>sudo apt install git<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<p>Confirm the installation and check the version executing the following command<\/p>\n<pre>git --version<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<p>The output should be:<\/p>\n<pre>Output:\r\n    git version 2.17.1<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<h3><span id=\"2_Setting_Up_Git\">2. Setting Up Git<\/span><\/h3>\n<p>To prevent warning every time you should configure it perfectly by using your Git information<\/p>\n<p>First set the global username for Git<\/p>\n<pre>git config --global user.name \"User Name\"<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<p>Secondly set global email for Git<\/p>\n<pre>git config --global user.email \"username@domain.com\"<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<p>You can also change above configuration by editing\u00a0<em>.gitconfig<\/em>\u00a0file. To edit gitconfig file type<\/p>\n<pre>nano ~\/.gitconfig<button class=\"copy-the-code-button\" title=\"Copy to Clipboard\">Copy<\/button><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-658 td-animation-stack-type0-2 lazyloaded\" src=\"https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/editing_git_configuration_file.png\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" srcset=\"https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/editing_git_configuration_file.png 734w, https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/editing_git_configuration_file-300x199.png 300w\" alt=\"Editing Git Configuration File\" width=\"734\" height=\"486\" data-lazy-src=\"https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/editing_git_configuration_file.png\" data-lazy-srcset=\"https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/editing_git_configuration_file.png 734w, https:\/\/linux4one.com\/wp-content\/uploads\/2018\/10\/editing_git_configuration_file-300x199.png 300w\" data-lazy-sizes=\"(max-width: 734px) 100vw, 734px\" data-was-processed=\"true\" \/><\/p>\n<p>Edit above file by setting Name and Email.<\/p>\n<h3><span id=\"Conclusion\">Conclusion<\/span><\/h3>\n<p>Here we have successfully learned how to install Git on Ubuntu 18.04 and you have also learned setting up Git to start working on the system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to install Git on Ubuntu 18.04 Contents 1\u00a0Prerequisites 2\u00a01. Install Git on Ubuntu 3\u00a02. Setting Up Git 4\u00a0Conclusion Installing Git on Ubuntu Git is the most popular version control system nowadays. It helps to share and collaborate on software development projects. It is mainly used for source code management. In this tutorial, you are &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/12\/how-to-install-git-on-ubuntu-18-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to install Git on Ubuntu 18.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7884","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=7884"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7884\/revisions"}],"predecessor-version":[{"id":7885,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7884\/revisions\/7885"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=7884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=7884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=7884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}