Version control and collaboration; Git & GitHub#

There are many Git and Github tutorials out there, and it is best to find a current tutorial to ensure that you learn about the most recent tools and techniques. See the Git & GitHub learning resources page.

UBC provides a secure Git repository-hosting service for academic use at UBC that students can access using their CWL. Instructor guidelines as of 2023 are here.

The reminder of this section of OCESE docuemntation (4 pages) was relevant in 2022.

Why Git#

Writing code, reports, articles, presentations or any form of documentation usually involves trial and error, so it makes sense to retain earlier versions of the project so you can recall or revert to older work as needed. However, manually keeping track of versions is messy and prone to making mistakes.

The Git software is a facility that was developed to address this “version control” challenge. It is a file management and version control system whith which you can periodically save your work (called making a commit) with notes, names, dates, or other information. With Git, you can then either revert to previous versions or join (i.e. merge) your efforts with work contributed by colleagues in an organized, reversible, secure and convenient manner.

All serious programmers and many writers of technical documentation use version control, and many use Git as the tool to both track their own work and collaborate with others. Git is a tool with a wide range of capabilities so it makes sense to start with a simple workflow, then progress to more sophisticated usage depending on your or your team’s needs.

Why GitHub#

Github is an online repository management and collaboration system used for backing up and (if relevant) sharing code or documents with collaborators. Repositories are copies of your files saved in the cloud, and can be either public (visible/accessible by anyone with the URL) or private (only accessible to specific users but subject to a subscription fee).

Note

It is important to recognize that version control - and therefore both Git and GitHub - works most effectively with text-based files and documents. “Binary” documents such as MSWord or PDF documents, spreadsheets (eg. Excel), presentations (e.g. Powerpoint), images, etc. can all be included BUT version control fails to work well on such files because it is difficult to compare versions of “binary” files.

Our introductory pages about Git and Github#