{"id":255,"date":"2017-02-15T20:55:18","date_gmt":"2017-02-16T04:55:18","guid":{"rendered":"http:\/\/courses.haigarmen.com\/intd319\/?p=255"},"modified":"2017-02-15T20:55:18","modified_gmt":"2017-02-16T04:55:18","slug":"using-github","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/intd319\/using-github\/","title":{"rendered":"Using GitHub"},"content":{"rendered":"<p>In this week\u2019s class we will learn the basics of version control, so that you can work on your final projects in a clean folder with a single set of files, but can save snapshots of versions of your work at each point and return to them if necessary.<\/p>\n<p>This avoids the hell of having to search through multiple versions of similar files. That, as Ben Welsh of the <em>Los Angeles Times<\/em> explains in <a href=\"https:\/\/www.youtube.com\/watch?v=2l-In12IqNQ\">this video<\/a>, legendary in data journalism circles as \u201cBen\u2019s rant,\u201d is nihilism!<\/p>\n<p>Version control was invented for programmers working on complex coding projects. But it is good practice for any project \u2014 even if all you are managing are versions of a simple website, or a series of spreadsheets.<\/p>\n<p>This tutorial borrows from the <a href=\"https:\/\/newmedia.report\/classes\/coding\/2016\/workflow-and-github\/\">Workflow and GitHub<\/a> lession in Jeremy Rue\u2019s <a href=\"https:\/\/newmedia.report\/classes\/coding\/2016\/\">Advanced Coding Interactives<\/a> class \u2014 see the further reading links below.<\/p>\n<h3>Introducing Git, GitHub and GitHub Desktop<\/h3>\n<p>The version control software we will use is called <strong><a href=\"https:\/\/git-scm.com\/\">Git<\/a><\/strong>. It is installed automatically when you install and configure <strong><a href=\"https:\/\/desktop.github.com\/\">GitHub Desktop<\/a><\/strong>. GitHub Desktop is a point-and-click GUI that allows you to manage version control for local versions of projects on your own computer, and sync them remotely with <strong><a href=\"https:\/\/github.com\/\">GitHub<\/a><\/strong>. GitHub is a social network, based on Git, that allows developers to view and share one another\u2019s code, and collaborate on projects.<\/p>\n<p>Even if you are working on a project alone, it is worth regularly synching to GitHub. Not only does this provides a backup copy of the entire project history in the event of a problem with your local version, but GitHub also allows you to host websites. This means you can go straight from a project you are developing to a published website. If you don\u2019t already have a personal portfolio website, you can host one for free on GitHub.<\/p>\n<h3>The files we will use today<\/h3>\n<p>Download the files for this session from <a href=\"http:\/\/paldhous.github.io\/ucb\/2016\/dataviz\/data\/week4.zip\">here<\/a>, unzip the folder and place it on your desktop. It contains the following folders and files:<\/p>\n<p><code>index.html<\/code> <code>index2.html<\/code> Two simple webpages, which we will edit and publish on GitHub.<br \/>\n<code>css<\/code> <code>fonts<\/code> <code>js<\/code> Folders with files to run the Bootstrap web framework.<\/p>\n<h3 id=\"some-terminology\"><a href=\"http:\/\/paldhous.github.io\/ucb\/2016\/dataviz\/week4.html#some-terminology\" name=\"some-terminology\"><\/a>Some terminology<\/h3>\n<ul>\n<li><code>repository<\/code> or <code>repo<\/code> Think of this as a folder for a project. A repository contains all of the project files, and stores each file\u2019s revision history. Repositories on GitHub can have multiple collaborators and can be either public or private.<\/li>\n<li><code>clone<\/code> Copy a repository from GitHub to your local computer.<\/li>\n<li><code>master<\/code> This is the main version of your repository, created automatically when you make a new repository.<\/li>\n<li><code>branch<\/code> A version of your repository separate from the master branch. As you switch back and forth between branches, the files on your computer are automatically modified to reflect those changes. Branches are used commonly when multiple collaborators are working on different aspects of a project.<\/li>\n<li><code>pull request<\/code> Proposed changes to a repository submitted by a collaborator who has been working on a branch.<\/li>\n<li><code>merge<\/code> Taking the changes from on branch and applying them to another. This is often done after a pull request.<\/li>\n<li><code>push<\/code> or <code>sync<\/code> Submitting your latest commits to the remote responsitory, on GitHub and syncing any changes from there back to your computer.<\/li>\n<li><code>gh-pages<\/code> A special branch that is published on the web. This is how you host websites on GitHub. Even if a repository is private, its published version will be visible to anyone who has the url.<\/li>\n<li><code>fork<\/code> Split off a separate version of a repository. You can fork anyone\u2019s code on GitHub to make your own version of their repo.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/help.github.com\/articles\/github-glossary\/\">Here<\/a> is a more extended GitHub glossary.<\/p>\n<h3>Create and secure your GitHub account<\/h3>\n<p>Navigate to <a href=\"https:\/\/github.com\/\">GitHub<\/a> and sign up:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_1.jpg\" alt=\"\" \/><\/p>\n<p>Choose your plan. If you want to be able to create private repositories, which cannot be viewed by others on the web, you will need to upgrade to a paid account. But for now select a free account and click <code>Continue<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_2.jpg\" alt=\"\" \/><\/p>\n<p>At the next screen, click the <code>skip this step<\/code> link:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_3.jpg\" alt=\"\" \/><\/p>\n<p>Now view your profile by clicking on the icon at top right and selecting <code>Your profile<\/code>. This is your page on GitHub. Click <code>Edit profile<\/code> to see the following:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_5.jpg\" alt=\"\" \/><\/p>\n<p>Here you can add your personal details, and a profile picture. For now just add the name you want to display on GitHub. Fill in the rest in your own time after class.<\/p>\n<p>You should have been sent a confirmation email to the address you used to sign up. Click on the verification link to verify this address on GitHub.<\/p>\n<p>Back on the GitHub website, click on the <code>Emails<\/code> link in the panel at left. If you wish, you can add another email to use on GitHub, which will need to be verified as well. If you don\u2019t wish to display your email on GitHub check the <code>Keep my email address private<\/code> box.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_6.jpg\" alt=\"\" \/><\/p>\n<p>Now click on the <code>Security<\/code> link. I strongly recommend that you click on <code>Set up two-factor authentication<\/code> to set up this important security feature for your account. It will require you to enter a six-digit code sent to your phone each time you sign on from an unfamiliar device or location.<\/p>\n<p>At the next screen, click <code>Set up using SMS<\/code>. Then enter your phone number, send a code to your phone and enter it where shown:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_7.jpg\" alt=\"\" \/><\/p>\n<p>At the next screen click <code>Download and print recovery codes<\/code>. These will allow you to get back into your account if you lose your phone. Do print them out, keep them somewhere safe, and delete the file.<\/p>\n<h3>Open and authenticate GitHub desktop<\/h3>\n<p>Open the GitHub Desktop app. At the opening screen, click <code>Continue<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_8.jpg\" alt=\"\" \/><\/p>\n<p>Then add your GitHub login details:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_9.jpg\" alt=\"\" \/><\/p>\n<p>You will then be sent a new two-factor authentication code which you will need to enter:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_10.jpg\" alt=\"\" \/><\/p>\n<p>At the next screen, enter your name and email address if they do not automatically appear, click <code>Install Command Line Tools<\/code>, and then <code>Continue<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_11.jpg\" alt=\"\" \/><\/p>\n<p>Then click <code>Done<\/code> at the <code>Find local repositories<\/code> screen, as you don\u2019t have local repositories to add.<\/p>\n<p>The following screen should now open:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_12.jpg\" alt=\"\" \/><\/p>\n<p>Your workspace contains one repo, which is an automated GitHub tutorial. Complete this in your own time if you wish. It will repeat many of the steps we will explore today.<\/p>\n<h3>Your first repository<\/h3>\n<h4>Create a new repository on GitHub<\/h4>\n<p>Back on the GitHub website, go to your profile page, click on the <code>Repositories<\/code> tab and click <code>New<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_13.jpg\" alt=\"\" \/><\/p>\n<p>Fill in the next screen as follows, giving the repository a name and initializing it with a <code>README<\/code> file. Then click <code>Create repository<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_14.jpg\" alt=\"\" \/><\/p>\n<p>You should now see the page for this repo:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_15.jpg\" alt=\"\" \/><\/p>\n<p>Notice that there is an <code>Initial commit<\/code> with a code consisting of a series of letters and numbers. There will be a code for each commit you make from now on.<\/p>\n<h4>Clone to GitHub desktop<\/h4>\n<p>Click on <code>Clone or download<\/code> and select <code>Open in Desktop<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_16.jpg\" alt=\"\" \/><\/p>\n<p>You should now be sent to the GitHub Desktop app, where you will be asked where on your computer you wish to clone the repo folder. Choose a location and click <code>Clone<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_17.jpg\" alt=\"\" \/><\/p>\n<p>Now you should be able to see the repo in the GitHub Desktop app:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_18.jpg\" alt=\"\" \/><\/p>\n<p>You should also be able to find the folder you just cloned in the location you specified:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_19.jpg\" alt=\"\" \/><\/p>\n<p>It contains a single file called <code>README.md<\/code>. This is a simple text file written in a language called Markdown, which we will explore shortly. You use this file to<br \/>\nwrite an extended description for your project, which will be displayed on the repo\u2019s page on GitHub.<\/p>\n<h4>Make a simple change to the project<\/h4>\n<p>Add the file <code>index.html<\/code> to the project folder on your computer. Notice that you now have <code>1 Uncommitted Change<\/code> in GitHub Desktop.<\/p>\n<p>Click on that tab, and you should see the following screen:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_20.jpg\" alt=\"\" \/><\/p>\n<p>GitHub Desktop highlights additions from your last commit in green, and deletions in red.<\/p>\n<h4>Commit that change, sync with GitHub<\/h4>\n<p>Write a summary and description for your commit, then click <code>Commit to master<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_21.jpg\" alt=\"\" \/><\/p>\n<p>Back in the <code>History<\/code> tab, you should now see two commits:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_22.jpg\" alt=\"\" \/><\/p>\n<p>So far you have committed the change on your local computer, but you haven\u2019t pushed it to GitHub, To do that, click the <code>Sync<\/code> button at top right.<\/p>\n<p>Go to the project page on the GitHub website, refresh your browser if necessary, and see that there are now two commits, and the <code>index.html<\/code> file is in the remote repo:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_23.jpg\" alt=\"\" \/><\/p>\n<h4>Make a new branch, make a pull request, and merge with master<\/h4>\n<p>Back in GitHub Desktop, click on the new branch button at top left, and create a new branch called <code>test-branch<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_24.jpg\" alt=\"\" \/><\/p>\n<p>You can now switch between your two branches using the button to the immediate right of the new branch, which will display either <code>master<\/code> or <code>test-branch<\/code>. Do pay close attention to which branch you are working in!<\/p>\n<p>Here I am working in the test branch, having made the edit below:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_25.jpg\" alt=\"\" \/><\/p>\n<p>While in the <code>test-branch<\/code> on Github Desktop, open <code>index.html<\/code> in a text editor. Delete <code>&lt;p&gt;I'm a paragraph&lt;\/p&gt;<\/code> and replace it with the following:<\/p>\n<pre class=\"css hljs\"><code class=\"CSS\" style=\"box-sizing: border-box; font-family: Consolas, Inconsolata, Courier, monospace; font-size: 0.9em; border-radius: 3px; word-wrap: break-word; border: 0px; padding: 0px 5px; margin: 0px; display: block; font-weight: bold; white-space: pre;\" data-origin=\"&lt;pre&gt;&lt;code class=&quot;CSS&quot;&gt;&amp;lt;h2&amp;gt;Hello again!&amp;lt;\/h2&amp;gt; &amp;lt;p&amp;gt;I'm a new paragraph&amp;lt;\/p&amp;gt; &lt;\/code&gt;&lt;\/pre&gt;\">&lt;h2&gt;Hello again!&lt;\/h2&gt;\r\n&lt;p&gt;I'm a new paragraph&lt;\/p&gt;\r\n<\/code><\/pre>\n<p>Save the file, then return to GitHub Desktop to view the changes in the <code>test-branch<\/code>.<\/p>\n<p>Now switch to the <code>master<\/code> branch and look at the file <code>index.html<\/code> in your text editor. It should have reverted to the earlier version, because you haven\u2019t merged the change in <code>test-branch<\/code> with <code>master<\/code>.<\/p>\n<p>Switch back to <code>test-branch<\/code> in Github Desktop, and commit the change as before with an appropriate summary and description:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_26.jpg\" alt=\"\" \/><\/p>\n<p>Click the <code>Pull request<\/code> at top right and then <code>Send Pull Request<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_27.jpg\" alt=\"\" \/><\/p>\n<p>You should now be able to see the pull request on GitHub:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_28.jpg\" alt=\"\" \/><\/p>\n<p>Click <code>Compare &amp; pull request<\/code> to see the following screen:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_29.jpg\" alt=\"\" \/><\/p>\n<p>If another collaborator had made this pull request, you might merge this into <code>master<\/code> online and then sync your local version of the repo with the remote to incorporate it.<\/p>\n<p>However, you made this pull request, so <code>Close pull request<\/code> and return to GitHub desktop. In the <code>master<\/code>branch, click <code>Compare<\/code> at top left. Select <code>test-branch<\/code> and then click <code>Update from test-branch<\/code>. This should merge the changes from <code>test-branch<\/code> into <code>master<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_30.jpg\" alt=\"\" \/><\/p>\n<p>Make sure you are in the <code>master<\/code> branch on GitHub Desktop, then view the file in your text editor to confirm that it is now the version you edited in <code>test-branch<\/code>.<\/p>\n<h4>Make a gh-pages branch, and publish to the web<\/h4>\n<p>In your <code>master<\/code> branch on Github Desktop, make a branch called <code>gh-pages<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_31.jpg\" alt=\"\" \/><\/p>\n<p>In this branch, click the <code>Publish<\/code> button at top right.<\/p>\n<p>Now go to the GitHib repo page, refresh your browser if necessary, and notice that this branch now exists there:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_32.jpg\" alt=\"\" \/><\/p>\n<p>Now go the the url <code>https:\/\/[username].github.io\/my-first-repo\/<\/code>, whhere <code>[username]<\/code> is your GitHub user name, and the webpage <code>index.html<\/code> should be online:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_33.jpg\" alt=\"\" \/><\/p>\n<h3>Introducing Markdown, Haroopad, and Bootstrap<\/h3>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Markdown\"><strong>Markdown<\/strong><\/a> provides a simple way to write text documents that can easily be converted to HTML, without having to worry about writing all of the tags to produce a properly formatted web page.<\/p>\n<p><a href=\"http:\/\/pad.haroopress.com\/\"><strong>Haroopad<\/strong><\/a> is a Markdown editor that we will use to edit the <code>README.md<\/code> for our repos, and also author some text to add to a simple webpage.<\/p>\n<p><a href=\"http:\/\/getbootstrap.com\/\"><strong>Bootstrap<\/strong><\/a> is a web framework that allows you to create responsively designed websites that work well on all devices, from phones to desktop computers. It was originally developed by Twitter.<\/p>\n<p>(I used Bootstrap to make this class website, writing the class notes in Markdown using Haroopad.)<\/p>\n<h4>Edit your README, make some more changes to your repo, commit and sync with GitHub<\/h4>\n<p>Open <code>README.md<\/code> in Haroopad. The Markdown code is shown on the left, and how it renders as HTML on the right:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_34.jpg\" alt=\"\" \/><\/p>\n<p>Now edit to the following:<\/p>\n<pre class=\"css hljs\"><code class=\"CSS\" style=\"box-sizing: border-box; font-family: Consolas, Inconsolata, Courier, monospace; font-size: 0.9em; border-radius: 3px; word-wrap: break-word; border: 0px; padding: 0px 5px; margin: 0px; display: block; font-weight: bold; white-space: pre;\" data-origin=\"&lt;pre&gt;&lt;code class=&quot;CSS&quot;&gt;# My first repository ### This is the repo we have been using to learn GitHub. Here is some text. Notice that it doesn't have the # used to denote various weights of HTML headings (You can use up to six #). And here is a [link](http:\/\/severnc6.github.io\/my-first-repo) to the &#96;gh-pages&#96; website for this repo. *Here* is some italic text. **Here** is some bold text. And here is a list: - first item - second item - sub-item - third item &lt;\/code&gt;&lt;\/pre&gt;\"># My first repository\r\n\r\n### This is the repo we have been using to learn GitHub.\r\n\r\nHere is some text. Notice that it doesn't have the # used to denote various weights of HTML headings (You can use up to six #).\r\n\r\nAnd here is a [link](http:\/\/severnc6.github.io\/my-first-repo) to the `gh-pages` website for this repo.\r\n\r\n*Here* is some italic text.\r\n\r\n**Here** is some bold text.\r\n\r\nAnd here is a list:\r\n- first item\r\n- second item\r\n - sub-item\r\n- third item\r\n<\/code><\/pre>\n<p>This should display in Haroopad like this:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_35.jpg\" alt=\"\" \/><\/p>\n<p>See <a href=\"https:\/\/github.com\/adam-p\/markdown-here\/wiki\/Markdown-Cheatsheet\">here<\/a> for a more comprehensive guide to using Markdown.<\/p>\n<p>Save <code>README.md<\/code> in Haroopad and close it.<\/p>\n<p>With Github Desktop in the <code>master<\/code> branch, delete <code>index.html<\/code> from your repo, and copy into the repo the file <code>index2.html<\/code> and the folders <code>js<\/code>, <code>css<\/code>, and <code>fonts<\/code>. Rename <code>index2.html<\/code> to <code>index.html<\/code>.<\/p>\n<p>You now have a template Bootstrap page with a navigation bar at the top. Open in a browser, and it should look like this:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_36.jpg\" alt=\"\" \/><\/p>\n<p>The links in the dropdown menu are currently to pages that don\u2019t exist, and the email link will send a message to me. Open in a text editor to view the code for the page:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_37.jpg\" alt=\"\" \/><\/p>\n<p>Open a new file in Haroopad, edit to add the following and save into your repo as <code>index-text.md<\/code>:<\/p>\n<pre class=\"css hljs\"><code class=\"CSS\" style=\"box-sizing: border-box; font-family: Consolas, Inconsolata, Courier, monospace; font-size: 0.9em; border-radius: 3px; word-wrap: break-word; border: 0px; padding: 0px 5px; margin: 0px; display: block; font-weight: bold; white-space: pre;\" data-origin=\"&lt;pre&gt;&lt;code class=&quot;CSS&quot;&gt;# A Bootstrap webpage ### It has a subheading And also some text. &lt;\/code&gt;&lt;\/pre&gt;\"># <span class=\"hljs-tag\">A<\/span> <span class=\"hljs-tag\">Bootstrap<\/span> <span class=\"hljs-tag\">webpage<\/span>\r\n\r\n### <span class=\"hljs-tag\">It<\/span> <span class=\"hljs-tag\">has<\/span> <span class=\"hljs-tag\">a<\/span> <span class=\"hljs-tag\">subheading<\/span>\r\n\r\n<span class=\"hljs-tag\">And<\/span> <span class=\"hljs-tag\">also<\/span> <span class=\"hljs-tag\">some<\/span> <span class=\"hljs-tag\">text<\/span>.\r\n<\/code><\/pre>\n<p>From the top menu in Haroopad, select <code>File&gt;Export...&gt;HTML<\/code> and notice that it has saved as a webpage in your repo your computer.<\/p>\n<p>We just want to take the text from the web page and copy it into our <code>index.html<\/code> page. To do this, select <code>File&gt;Export...&gt;Plain HTML<\/code> from the top menu in Haroopad, open <code>index.html<\/code> in your text editor, position your cursor between immediately below the <code>&lt;div class=\"container\"&gt;<\/code> tag, and <code>\u2318-V<\/code> to paste in the HTML for the text we wrote in Haroopad.<\/p>\n<p>Save <code>index.html<\/code> and view in your browser.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_38.jpg\" alt=\"\" \/><\/p>\n<p>In GitHub Desktop, view the uncommited changes, <code>Commit to master<\/code> and <code>Sync<\/code> to GitHub.<\/p>\n<p>Now switch to the <code>gh-pages<\/code> branch, <code>Update from master<\/code> and <code>Sync<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_39.jpg\" alt=\"\" \/><\/p>\n<p>Both the <code>master<\/code> and <code>gh-pages<\/code> branches should now be updated on GitHub:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_40.jpg\" alt=\"\" \/><\/p>\n<p>Follow the link we included in the <code>README<\/code>, and you\u2019ll be sent to the hosted webpage, at <code>https:\/\/[username].github.io\/my-first-repo\/<\/code>, where <code>[username<\/code>] is your GitHub user name.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/courses.haigarmen.com\/intd319\/files\/2017\/02\/class4_41.jpg\" alt=\"\" \/><\/p>\n<h4>Next steps with Bootstrap<\/h4>\n<p>W3Schools has a tutorial <a href=\"http:\/\/www.w3schools.com\/bootstrap\/default.asp\">here<\/a>, and Jeremy Rue has a tutorial <a href=\"https:\/\/newmedia.report\/classes\/webskills\/2016\/2016-11-29-bootstrap-framework\/\">here<\/a>. The key to responsive design with Bootstrap is its grid system, which allows up to 12 columns across a page. <a href=\"http:\/\/www.w3schools.com\/bootstrap\/bootstrap_grid_system.asp\">This section<\/a> of the W3schools tutorial explains how to use the grid system to customize layouts for different devices.<\/p>\n<p><a href=\"http:\/\/bootstrap3-menu.codedorigin.com\/\">This site<\/a> helps you customize a Bootstrap navigation bar.<\/p>\n<p>There are various sites on the web that provide customized Bootstrap themes \u2014 some free, some not. Search \u201cBootstrap themes\u201d to find them. A theme is a customized version of Bootstrap that can be used as a starting point for your own website. Jeremy Rue has also created a <a href=\"https:\/\/newmedia.report\/images\/classes\/webskills\/portfolio-template.zip\">suggested portfolio theme<\/a>.<\/p>\n<h3>Assignment<\/h3>\n<ul>\n<li>Create a repository on GitHub to host your final project and clone to your computer so you can manage the project in GitHub Desktop.<\/li>\n<li>In Markdown, write a pitch for your final project in a file called <code>project-pitch.md<\/code>. Your final project accounts for 45% of your grade for this class, so it\u2019s important that you get off to a good start with a substantial and thoughtful pitch. You will also be graded separately on this pitch assignment.\n<ul>\n<li>Explain the goals of your project.<\/li>\n<li>Detail the data sources you intend to use, and explain how you intend to search for data if you have not identified them.<\/li>\n<li>Identify the questions you wish to address.<\/li>\n<li>Building from these questions, provide an initial outline of how you intend the visualize the data, describing the charts\/maps you are considering.<\/li>\n<\/ul>\n<\/li>\n<li>Using Haroopad, save the Markdown document as an HTML file with the same name.<\/li>\n<li>Create a <code>gh-pages<\/code> branch for your repository and publish it on GitHub. View the webpage at created at <code>http:\/\/[username].github.io\/[project]\/project-pitch.html<\/code> where <code>[username]<\/code> is your GitHub user name and <code>[project]<\/code> is the name of your project repository.<\/li>\n<li>Share that url with me so I can read your project pitch and provide feedback.<\/li>\n<\/ul>\n<h3>Further reading<\/h3>\n<p><a href=\"https:\/\/newmedia.report\/classes\/coding\/2016\/workflow-and-github\/\">Workflow and Github<\/a><br \/>\nLesson from Jeremy Rue\u2019s <a href=\"https:\/\/newmedia.report\/classes\/coding\/2016\/\">Advanced Coding Interactives<\/a> class.<\/p>\n<p><a href=\"https:\/\/help.github.com\/desktop\/guides\/getting-started\/\">Getting Started with GitHub Desktop<\/a><\/p>\n<p><a href=\"https:\/\/guides.github.com\/features\/pages\/\">Getting Started with GitHub Pages<\/a><br \/>\nThis explains how you can creates web pages automatically from GitHub. However, I recommend authoring them locally, as we covered in class.<\/p>\n<p><a href=\"https:\/\/git-scm.com\/doc\">Git Reference Manual<\/a><\/p>\n<p><a href=\"http:\/\/getbootstrap.com\/getting-started\/\">Getting started with Bootstrap<\/a><\/p>\n<p><a href=\"http:\/\/www.w3schools.com\/bootstrap\/\">W3Schools Bootstrap tutorial<\/a><\/p>\n<p><a href=\"https:\/\/newmedia.report\/classes\/webskills\/2016\/2016-11-29-bootstrap-framework\/\">Using Bootstrap Framework For Building Websites<\/a><br \/>\nLesson from Jeremy Rue\u2019s <a href=\"https:\/\/newmedia.report\/classes\/webskills\/2016\/\">Intro to Multimedia Web Skills<\/a> class.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this week\u2019s class we will learn the basics of version control, so that you can work on your final projects in a clean folder with a single set of files, but can save snapshots of versions of your work at each point and return to them if necessary. This avoids the hell of having [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":2,"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":297,"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/posts\/255\/revisions\/297"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/intd319\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}