{"id":379,"date":"2021-09-19T10:02:47","date_gmt":"2021-09-19T18:02:47","guid":{"rendered":"http:\/\/spacefold.com\/colin\/morethanfour\/?p=379"},"modified":"2021-09-19T12:41:40","modified_gmt":"2021-09-19T20:41:40","slug":"learning-git-apx-a-installing","status":"publish","type":"post","link":"https:\/\/spacefold.com\/colin\/morethanfour\/2021\/09\/19\/learning-git-apx-a-installing\/","title":{"rendered":"Learning Git &#8211; Appendix A: Installing"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Linux<\/h3>\n\n\n\n<p>My Linux Mint box seems to have a default version of Git installed:<\/p>\n\n\n\n<pre>$ git --version<\/pre>\n<pre class=\"console-output\">git version 2.17.1<\/pre>\n\n\n\n<p>However, we can get the latest version (for Mint\/Ubuntu\/Debian):<\/p>\n\n\n\n<pre>$ sudo add-apt-repository ppa:git-core\/ppa<\/pre>\n<pre class=\"console-output\">You are about to add the following PPA:\nThe most current stable version of Git for Ubuntu.\nFor release candidates, go to https: \/launchpad.net\/~git-core\/+archive\/candidate .\nMore info: https: \/launchpad.net\/~git-core\/+archive\/ubuntu\/ppa\nPress Enter to continue or Ctrl+C to cancel\nExecuting: \/tmp\/apt-key-gpghome.RVLrIDy8yS\/gpg.1.sh --keyserver hkps: \/keyserver.ubuntu.com:443 --\nrecv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24\ngpg: key A1715D88E1DF1F24: public key \"Launchpad PPA for Ubuntu Git Maintainers\" imported\ngpg: Total number processed: 1\ngpg: imported: 1<\/pre>\n\n\n\n<p>And then:<\/p>\n\n\n\n<pre>$ sudo apt-get update<\/pre>\n<pre class=\"console-output\">Ign:1 http: \/packages.linuxmint.com tina InRelease\nHit:2 http: \/packages.linuxmint.com tina Release\n[..]\nGet:12 http: \/ppa.launchpad.net\/git-core\/ppa\/ubuntu bionic\/main Translation-en [2,252 B]\nFetched 281 kB in 2s (140 kB\/s)\nReading package lists . Done<\/pre>\n\n\n\n<p>Then, re-install:<\/p>\n\n\n\n<pre>$ sudo apt-get install git<\/pre>\n<pre class=\"console-output\">Reading package lists ... Done\nBuilding dependency tree\nReading state information ... Done\nThe following packages were automatically installed and are no longer required:\ngir1.2-mate-desktop gir1.2-mate-panel libllvm6.0:i386 libllvm7 libllvm7:i386 libwaylandclient0:i386 libwayland-server0:i386 python-psutil python-xapp\nUse 'sudo apt autoremove' to remove them.\nThe following additional packages will be installed:\ngit-man libpcre2-8-0\nSuggested packages:\ngit-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs gitmediawiki git-svn\nThe following NEW packages will be installed:\nlibpcre2-8-0\nThe following packages will be upgraded:\ngit git-man\n2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 8,050 kB of archives.\nAfter this operation, 9,595 kB of additional disk space will be used.\nDo you want to continue? [Y\/n] y\n- 18 -\n[ .]\nProcessing triggers for man-db (2.8.3-2ubuntu0.1) ...\nProcessing triggers for libc-bin (2.27-3ubuntu1) ...<\/pre>\n\n\n\n<p>After which:<\/p>\n\n\n\n<pre>$ git --version<\/pre> \n<pre class=\"console-output\">git version 2.28.0<\/pre>\n\n\n\n<p>Further reading:<\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/19109542\/installing-latest-version-of-git-in-ubuntu\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/stackoverflow.com\/questions\/19109542\/installing-latest-version-of-git-in-ubuntu<\/a><br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Windows<\/h3>\n\n\n\n<p>Install Git for Windows, and include the Git Bash Prompt.<\/p>\n\n\n\n<p>Git Bash prompt maps &#8220;home&#8221; or &#8220;~&#8221; to C:\\users\\Buster. <\/p>\n\n\n\n<p>Through a bit of jiggery-pokery, although &#8220;\/&#8221; is mapped to the Git install folder (i.e. &#8220;C:\\Program Files\\Git&#8221; , in order to get to the C: or D: drive you use &#8220;\/C\/&#8221; or &#8220;\/D\/&#8221;.<\/p>\n\n\n\n<p>Hey, it&#8217;s better than what Cygwin does. <\/p>\n\n\n\n<p>As a long-time user of TortoiseSVN, at first I thought I would use TortoiseGit but in hindsight, it is better to just bite the bullet and experiment with the command line. There&#8217;s just too much difference in how the two source control systems work. I got used to the Git Bash prompt quickly, and now it seems like the best way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux My Linux Mint box seems to have a default version of Git installed: $ git &#8211;version git version 2.17.1 However, we can get the latest version (for Mint\/Ubuntu\/Debian): $ sudo add-apt-repository ppa:git-core\/ppa You are about to add the following PPA: The most current stable version of Git for Ubuntu. For release candidates, go to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-379","post","type-post","status-publish","format-standard","hentry","category-source-control","post-preview"],"_links":{"self":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/posts\/379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/comments?post=379"}],"version-history":[{"count":0,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/posts\/379\/revisions"}],"wp:attachment":[{"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/media?parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/categories?post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spacefold.com\/colin\/morethanfour\/wp-json\/wp\/v2\/tags?post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}