{"id":3224,"date":"2018-05-15T18:22:40","date_gmt":"2018-05-15T18:22:40","guid":{"rendered":"https:\/\/max-drake.cc\/?p=3224"},"modified":"2018-05-15T18:23:28","modified_gmt":"2018-05-15T18:23:28","slug":"github-learning-basic-setup-and-use","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=3224","title":{"rendered":"Github &#8211; learning basic setup and use"},"content":{"rendered":"<p>I have downloaded a lot of stuff from Github but haven&#8217;t really bothered figuring what it was about.<\/p>\n<p>I found this video a simple way to get my head around it and get to use it initially:<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><a href=\"https:\/\/www.youtube.com\/watch?v=0fKg7e37bQE\">Github Tutorial For Beginners &#8211; Github Basics for Mac or Windows &amp; Source Control Basics<\/a><\/p>\n<p>I had signed up to an account previously ( only realising when I tried to make a new account of the same name).<\/p>\n<p>I downloaded the windows 64 bit version of the <a href=\"https:\/\/desktop.github.com\/\" target=\"_blank\" rel=\"noopener\"><strong>desktop app<\/strong><\/a>.<\/p>\n<p>After creating a new blank &#8221; repository&#8221; called<strong>&nbsp;<\/strong><em>PanoramaHTML<\/em>&nbsp;in my Github account as per the video with a <em>ReadMe.md<\/em> file created.<\/p>\n<p>I created a new directory called github in my downloads directory (my area of working) and then created a subdirectory called <em>PanoramaHTML. <\/em><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3228 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-1024x1015.jpg\" alt=\"\" width=\"1435\" height=\"1422\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-1024x1015.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-150x150.jpg 150w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-300x297.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-768x761.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01.jpg 1580w\" data-sizes=\"(max-width: 1435px) 100vw, 1435px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1435px; --smush-placeholder-aspect-ratio: 1435\/1422;\" \/><\/p>\n<p>Then went to that directory and tried to use the command as per the video:<\/p>\n<p>\\Downloads\\_Github\\PanoramaHTML1&gt;<strong>git clone<\/strong> https:\/\/github.com\/drakemax\/PanoramaHTML.git<\/p>\n<p>It didn&#8217;t work. In the command console windows did not recognise the &#8220;git&#8221; command.<\/p>\n<p>So back to Mr Google &amp; StackOverflow where I found <a href=\"https:\/\/stackoverflow.com\/questions\/35619305\/enabling-git-in-windows-10-command-line#35619745\" target=\"_blank\" rel=\"noopener\">this article<\/a>. It pointed to using this software&#8221; G<a href=\"https:\/\/github.com\/git-for-windows\/git\/releases\" target=\"_blank\" rel=\"noopener\">it for Windows<\/a>&#8221; . I downloaded that software (slow to start up the .exe file) and it works fine, so I can now use git on the command line as per the video.<\/p>\n<p>So, after getting git to work on the command prompt I redid the command:<\/p>\n<p>\\Downloads\\_Github\\&gt;<strong>git clone<\/strong> https:\/\/github.com\/drakemax\/PanoramaHTML.git<\/p>\n<p>I only went to the main directory:<\/p>\n<p>\\Downloads\\_Github\\&gt;<\/p>\n<p>To run the command. The clone command creates\/adds the subdirectory:<\/p>\n<p>\/PanoramaHTML<\/p>\n<p>on my computer. So that is easy, no need to create a directory for where you want it to be.<\/p>\n<p>After setting up the directory on my computer I proceeded to place all the files in there that I wanted and also updated the README.md file to explain what files are in there and how to use them.<\/p>\n<p>As I had updated the files on my computer, I need to change directory using<\/p>\n<p>\\Downloads\\_Github\\&gt; cd PanoramaHTML<\/p>\n<p>\\Downloads\\_Github\\PanoramaHTML\\&gt;<\/p>\n<p>Once directory changed, I needed to add the files to the git repository, as I&#8217;d added folders and files and updated the readme.md file, so<\/p>\n<p>\\Downloads\\_Github\\PanoramaHTML\\&gt; git add -A (this adds all&nbsp; <em>file contents to the index<\/em>)<\/p>\n<p>Then I needed to <em>Record changes to the repository<\/em> using the<strong> commit<\/strong> command so:<\/p>\n<p>\\Downloads\\_Github\\PanoramaHTML\\&gt; git commit -m &#8220;<em>Folders and files added to directory and Readme file updated<\/em>&#8221;<\/p>\n<p>Then I can push the files up to GITHUB with:<\/p>\n<p>\\Downloads\\_Github\\PanoramaHTML\\&gt; git push<\/p>\n<p>To check if they are the same (local git on computer and one at github :<\/p>\n<p>\\Downloads\\_Github\\PanoramaHTML&gt;git status<br \/>\n<em>On branch master<\/em><br \/>\n<em>Your branch is up to date with &#8216;origin\/master&#8217;.<\/em><\/p>\n<p>So that is great.<\/p>\n<p>I can now use the clone\/download button to copy the link to share it with others:<\/p>\n<p>https:\/\/github.com\/drakemax\/PanoramaHTML.git<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3228 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-1024x1015.jpg\" alt=\"\" width=\"1310\" height=\"1298\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-1024x1015.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-150x150.jpg 150w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-300x297.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01-768x761.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01.jpg 1580w\" data-sizes=\"(max-width: 1310px) 100vw, 1310px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1310px; --smush-placeholder-aspect-ratio: 1310\/1298;\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have downloaded a lot of stuff from Github but haven&#8217;t really bothered figuring what it was about. I found this video a simple way to get my head around it and get to use it initially: Github Tutorial For Beginners &#8211; Github Basics for Mac or Windows &amp; Source Control Basics I had signed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3228,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,29],"tags":[],"class_list":["post-3224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-web"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/05\/imgit01.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/3224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3224"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/3224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/3228"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}