Skip to main content

Git vs Github

While it is not necessary to know about the background of git and github, it might provide some context as to why the tools behave the way they do. This section has optional information to provide this context.

Git

Git was initially created by Linus Torvald to manage patches for for the Linux project. The command line git client is open source and available for Linux, Windows and MacOS. Git was conceived as a distributed revision control system and does not require a server.

Another useful way to think about git is to think of it as a 3D file system. Normally when we think about file systems, we think about files in its current state. Backing up a file typically involves making a copy and giving it a different name. This method however can get messy quickly. Git allows us to save snapshots of the state of our files. Not only do we have the file in its current state but we can save versions of each of the files. These versions are available when we want them to be but are hidden from us at other times. git also allows us to split the history of our files and merge them back together again.

Learning git can be challenging but also very useful. It has many commands and many functionalities. If you are new to learning git, start with simple and simply use it for creating a set of snapshots and become comfortable with accessing previous versions of your file. As you get more comfortable you can explore branching and merging.

It should also be noted that you can use github and github classroom without learning commandline git. Github itself is a web interface that allows you to do many of the standard things you would want to do in git. If you wish to use git locally without using command line git tools there are gui based git clients that will allow you to do most of the things you would normally do with command line git. Thus it is more useful to understand the concepts of how git works rather than the commands needed to use it.

Github

Github is a website (and a company) that provides tools on top of git. Git is serverless. If you are working with other people on a project, you would each have your own git repository. You would also need a way to share these repositories, manage access and update repositories.

Github effectively acts as a host for git repositories. It provides a web interface to these repositories, allows for user access management and organization of repositories. The tools are designed for collaboration on a set of documents. It makes using git really smooth.

Aside from user management, github also offers a lot of really useful tools that work with repositories hosted on their platform. These tools may be useful for you also:

  • github pages - allows you to host web pages. This set of notes are being hosted on github pages.
  • actions - a Continuos Integration/Continous Deployment (CI/CD) tool that can be used to do various tasks when files in the repository are changed. For example, each time the files in the repository for these notes are pushed into the repository, an action is triggered that will build the webite and re-generate the pdf version notes
  • code spaces - Provides an in browser IDE that will clone the repository and allow students to do their work in the browser (requires upgrade)
  • issues - a tool that allows for discussion of files within the repository.
  • discussion boards - you can host a discussionboard for your classes using github.

It should be noted that outside of github, there are also other companies that offers a similar hosting services such as Bitbucket and Gitlab. They may have similar feature sets as Github so it is worth looking at them. However these notes are about github classroom so Github will be our focus.

Cost

Github accounts are free to create. When you put a repository into github, that repository is either public (the entire world can see it) or private (only you and those you grant permission to can access it). The paid tier provides more tools or more resources. For example, at the free tier you have access to 2000 minutes of build time on private repositories but at the team tier you get 3000 minutes. Some tools are available not available for private repos at the free tier at all (such as github pages). Whether or not you need to upgrade to the team tier depends on what you want to do.

As teachers you can request an upgrade that will allow you to have team tier access to the tools that would normally be a paid service.

Learning Git and Github

If you are interested in learning how to use github itself or even how to use git, I have created some tutorials for this. The activities takes you through the fundamentals of git. You can find them here:

https://github.com/catherine-leung/git-workshop