In this session, we will provide a quick overview of GitHub. It will cover some basic usages of GitHub Desktop due to the time limitation of the class.
Git is a version control system that allows us to track changes in any set of files. It is typically used by programmers who are working on source code together.
GitHub is a version control and collaboration tools for programming. It allows us to collaborate on projects from any location with other people.
Installing GitHub Desktop from https://desktop.github.com/
We will create a process that shows how to create a repository, track changes, and explore a file’s history.
Here is an example that shows how GitHub Desktop looks like.
Fetch downloads the most recent updates from origin but it does not update our local working copy with the changes. After we click Fetch origin, the button changes to Pull Origin. Clicking Pull Origin will update our local working copy with the fetched updates.
When we commit the changes, the list of uncommitted changes was gone from the left pane. We have, however, just committed the changes locally. The commit must be pushed to the remote (origin) repository.
The html file needs to be named as index.html.
Note: It may take a few minutes to have the webpage available online, depending on the HTML file size.
One can find that it is less effective when creating a repository for posting only one HTML file. There could be a situation where we have to post multiple HTML pages. There is an easy way to do this. This also applies to the situation when one webpage is posted.
Head over to GitHub and create a new public repository named username.github.io, where the username is our username on GitHub.
Go to the folder where we want to store our webpages.
Add the HTML files.
The webpage is available at
https://username.github.io/folder/filename.html.
For example, all the class lessons are stored in the the folder teaching/MTH209 in the GitHub repository ying-ju.github.io. The webpage for this lesson is
You can utilize the following single character keyboard shortcuts to enable alternate display modes (Xie, Allaire, and Grolemund (2018)):
A: Switches show of current versus all slides (helpful for printing all pages)
B: Make fonts large
c: Show table of contents
S: Make fonts smaller