Version Control

1. Version Control with Git via GitHub

As you write a computer program or any other document, it is important to be able to save your work. This includes

  • saving your work at intermediate stages

  • creating multiple versions], so that you can select the option that balances the goals of being elegant (easy-to-understand), approachable (easy-to-use), and efficient (requiring less resources).

  • editing files and groups of files collaboratively in a way that minimizes conflicts/inconsistencies and maximizes teamwork/accountability.

1.1. 🥅 Learning Objectives

  • Understand what version control is and why it is useful.

  • Understand what Git is and how to use Git via GitHub.

  • Know what a repository (repo) is, and how to use a repository for version control.

  • Understand the basics of GitHub Classroom.

1.2. Version Control: Git, GitHub, and GitHub Classroom

Version control allows you to save your work, maintain multiple versions of the same document/program in repositories, and easily go back to old versions of the document/program (if you accidentally break it or decide that you made a bad decision). It is most effective when you save (i.e., commit) your work early and often with an informative comment about the changes you made. (That makes it easy to find exactly the version you want!) Version control is essential when multiple people work on a file (or group of files) at the same time: it keeps track of who made what changes to each file, and in cases where multiple people changed the same file at the same time in mutually incompatible ways, it flags these inconsistencies so that an informed choice can be made.

Click here to learn more about various types of version control.

In this course, we use web-based version control (specifically Git and GitHub) to share material. The goal is to make it easy to share material, revise and test assignments, and discuss course content. Specifically, the course will use:

1.3. 👩🏽‍💻 Assignment

  • You will learn more about GitHub through the assignment.

1.4. 📚 References

You can learn more about Git and GitHub via LinkedIn Learning Courses.

Hat Tip: Farnaz Heidar-Zadeh of Queen’s University. This is adapted from her orientation notes in the QC-Edu Boot Camp.