Setting up a Github Repository#

Github is a platform used to store, manage, and share code online. It has a variety of uses across many different coding languages - infact, these course notes are stored on Github. A Github repository will be used during the CS 185C course of Fall 2024 to manage code and submit assignments. An example repository will be maintained throughout the course for reference, which you can access at ProfMikeWood/cs185c_fall2024.

To get started, create a Github account at github.com/, if you haven’t already done so.

Setting up a Repository#

A repository is used to store a certain selection of code and documentation, such as for a project or a course. To set up a Github repository, log in to your Github account click on the green New Repository button on the homepage.

Repository Name#

Begin by selecting a name for your repository. The name should be descriptive of the contents of the repository. If you are using the repository for the CS 185C course, you may choose a name such as cs185c_fall2024 or something similar. Note that the repository name does not need to include your name or username as your account will be associated with your repository.

Public vs Private#

Next, select whether you would like your repository to public or private. Some people like to keep all of their repositories public for a variety of reasons - for example, to maintain open-source code or to attract potential collaborators working on similar topics. Other prefer to keep their repositories private, sharing coding only with approved collaborators. Often, developers will work on a private repository until they are ready to release a version of their code in the wild.

Adding a README#

Up next, choose the option to add a README.md file to the repository. A README.md is a document formatted with markdown (md) to describe the contents of the repository.

Adding a .gitignore#

Next, add a .gitignore file. Since we’ll be using Python constantly in this course, choose the template for Python. This file will ensure that extraneous files necessary for running code on our machine will not end up on Github.

Choosing a License#

Finally, choose a license. There are lots of different licenses available, each outlining different permissions for other users who may want to use your code. One common option is the BSD-3-Clause. This license allows others users to use your code for whatever they see fit. The key stipulations are that they must attribute your work to you and that you don’t endorse whatever they may do with your code. You’re enouraged to peruse the available licenses and choose the one you find fits your work the best.

Finalize the Repository#

After choosing your configuration options, click Create Repository. Woohoo! We’re ready to being coding.

Note

If you are following these notes for CS 185C and you elect to keep your repository public, be sure to add Mike as a collaborator. Navigate to the Settings tab and click on Collaborators on the left menu. Then, search for Mike Wood - his username is ProfMikeWood.