GitHub.com is a web-based Git repository hosting service. They allow uses to store and sync repositories with their service for free.
GitHub allows users to have an unlimited number of public repositories under 2GB each. Meaning your source code is publicly available to the world for them to view and fork (copy). This is great, as it encourages “open source” software projects. Open source software encourages the development of shared knowledge and progress within the open source community. It also means that all code is publicly viewable.
GitHub also provides advanced collaboration tools. This is not something you will use much this semester. However, it is important to know about and you will use it in future projects.
GitHub also provides a service known as GitHub pages. This service provides free static website hosting. This is what you will primarily use this semester to host your code sketches. (Did I mention it is free! This means you do not have to purchase server providers from another company.)
Each repository also contains a community-editable wiki page, which can provide in depth information and how-to tutorials on a specific project.
The Issues tracker serves as a place for people to create new “issue” or “feature requests”. This can then be used to assign people to work on these issues, ask for help from other users, or track the progress of a new feature.
This course, the one you are looking at right now, is being provided to you entirely through GitHub.
The website you are looking at now is hosted via GitHub pages.
Also, almost all of the resources for this course that you will need are available from a course repo. Eventually, I will show you how to “clone” the course repo to your own machine so that you can have easy access to these resources.
You will submit links to your homework assignments to the wiki page for the course repo. This will allow you to see each others work as well.
The wiki will also be somewhere that you can post resources
Finally, you will be expected to log “issues” which might be problems or questions. You will also be expected to respond to at least one issue every week.
First, visit GitHub.com and create a new user account. (NOTE: This should have been completed during week-1, please feel free to skip ahead if you are all caught up)
NOTE: Please choose a username that you are comfortable with being part of your publicly visible URL. Ideally, this should be your name or something similar. Your username will be publicly available and used often for many things throughout this course and your entire time on GitHub.
In order to leverage the full power of GitHub Desktop we need to move our git repository to GitHub.com. This is a straight forward procedure.
From GitHub Desktop app press the “Publish repository” button on the top-right of the application window.
When the publish window comes up, label the repository as you would like (probably, “120-work”), add a description.
Deselect, the “Keep this code private” checkbox. (This makes your repo public, which is necessary for this course and also required for all repositories in free GitHub accounts.)
Finally, press the “Publish Repository” button.
If you don’t get an error message, you should be good to go. To check if all your files uploaded and the repo was created successfully, open the “Repository” menu in GitHub Desktop and select “View on GitHub”. This will take you to your repo on GitHub.com. You should then bookmark this URL, you will come here a lot.
(NOTE: It may sometimes take GitHub a number of minutes to show updates to your repository via its web-interface. If this happens check again in 2, 5, or 10 minutes.)
Back in GitHub Desktop, the button that used to say “Publish” should now say “Fetch Origin”. This means there are no new changes to sync with the remote version of the GitHub repo. Whenever you commit new changes to your Git repo via GitHub Desktop, this button will change to “Push origin”. This will sync your local copy with the remote version. Thereby, pushing all of your work to the “cloud”.
To verify success in pushing the repo, go to GitHub.com. You should see “120-work” under “Your repositories”.
Select your 120-work repository. You should see the files you added to your repo on the GitHub.com site.
You can now select any of these files to view their contents.
Likewise, you can select the “commits” tab to see all of the commits you have made in your repo so far.
Finally, you will notice that the contents of the README.md
file is shown on this main page for your repo. This is a standard feature of GitHub, at any directory level of your repo, if there is a README.md
, then it will get displayed.