We will use GitHub for all things related to code in class, including sharing lecture code examples, sharing starter homework and project code, submitting homeworks and projects, and collaborating on projects. It is a software development platform built on top of the
git software, which is version control system for software.
Use this guide to get started with GitHub for the first time and learn some of the basics of the
git software it is built upon.
Setup GitHub Account
If you do not yet have a free GitHub account, you need to create one:
When creating an account for this class (including accounts already created), keep in mind:
Choose a professional username.
Add information to your profile, including a professional profile photo and brief bio (including your degree and expected graduation date).
@usfca.eduemails to your account. Go to “Settings” » “Access” » “Emails” to add an email.
@usfca.eduversion of your email is an alias that forwards to your
@dons.usfca.eduaccount. Some university services use this alias, including Canvas and Zoom. That is why you need to add both forms of your email address.
Apply for the GitHub Student Developer Pack after adding your university emails to your account.
You can see the instructor’s profile page for an example. When done with this class, you’ll be able to show off your GitHub profile to potential employers.
Using your GitHub username and password authentication no longer an option for authentication via the command-line.
Setup Repository Access
You will need to access your private GitHub repositories on your own local system to run and develop code. There are two options for accessing your private repositories:
Using SSH, which involves generating SSH keys per system you want to access GitHub from. If you already use SSH (for example, to access
stargate.cs.usfca.edu), then that approach may be more convenient since you likely already have SSH keys generated.
Using HTTPS, which involves generating a personal access token (instead of a password). If you do not already use SSH, I recommend the HTTPS method. It allows more fine-grained control, including when it should expire. With this option, make sure to configure an expiration after the end of the semester, and add both “repo” and “workflow” access:
Either way works; they each have different pros and cons. When you know which method you prefer, go to the Authenticating with the command line article on GitHub for details about get started.
You should only need to complete this step once for the entire semester!
Learn Git and GitHub
If you are unfamiliar with
git and GitHub, it is important to self-learn some basics. The operations we will use in class include: commit, push, pull, merge, and branch. The GitHub features we will use in class include releases, issues, and pull requests.
The CS Tutoring Center has recordings of past
git workshops posted:
Here are some other fantastic (and free) guides you can look at to learn more:
Guides for learning more about GitHub by GitHub.
GitHub Training and Guides (Videos)
Videos produced by GitHub for learning Git and GitHub.
GitHub Learning Lab
Hands-on GitHub lessons taught by the friendly GitHub Learning Lab bot.
Official Git project site (includes tutorials, a reference manual, and the free “Pro Git” ebook).
Here are a couple free resources that will help use
git with Eclipse:
GitHub and Eclipse (Video)
Videos produced by GitHub for using GitHub with Eclipse.
Eclipse EGit Plugin User Guide
User guide for the builtin
gitplugin in Eclipse. Works with GitHub repositories.
You also have free access to Linkedin Learning (formerly Lynda.com), which has many technical online tutorials and mini-courses. If you prefer that format, I strongly encourage you to take a look. There are many other resources you can find with a simple web search, like this Really Friendly Git Intro zine by Tracy Osborn or the Oh Shit, Git! zine by Julia Evans.
Don’t just wing it! I recommend you spend some time learning the basics of
git now, as it is a core skill for anyone in the tech and CS industries. It will also make this class and all CS classes that follow a lot less frustrating.