CS 272 Software Development

CS 272-01, CS 272-02 • Fall 2022

Getting Started with GitHub

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.

If you do not yet have a free GitHub account, you need to create one:

https://github.com/join

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).

  • Add your @dons.usfca.edu and @usfca.edu emails to your account. Go to “Settings” » “Access” » “Emails” to add an email.

     The @usfca.edu version of your email is an alias that forwards to your @dons.usfca.edu account. 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.

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:

  1. 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.

  2. 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:

    Token Scope

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!

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:

Here are a couple free resources that will help use git with Eclipse:

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.