DEV Community

Cover image for How I Teach: Version Control *with G Sheets*
Mia
Mia

Posted on

How I Teach: Version Control *with G Sheets*

Hello and (a very late) happy new year!

For the first blog post of the decade I thought I'd talk a little bit about how I like to introduce students to version control ✨.

I was first taught version control through a GitHub Desktop demo, I got there in the end but let me tell you ... it took months before I finally understood what a commit is! After being taught version control by two courses after that, I believe I have narrowed down the issue that a lot of people encounter when they first teach version control:

There isn't anything you can compare it to - you could say it's like 'saving' a file but let's be real, it's not really!

A fantastic and visual example of how GitHub works is Google Sheets version history feature. Go ahead and create a sheet, you could even name it repository to introduce the concept!

Once the sheet is created, you can access its version history like so:

How to access version history in Google Sheets

The version history has a list of all the changes that have been made by the user over time:

Alt Text

These are commits, you can click on them to view what the user changed and you can even revert back to that commit:

Alt Text

After running through this example, you can go back to GitHub in the browser and show the exact same process:

  • Create a repo
  • Make a change (do this online first)
  • Commit it and show the commit in the commits history

Top Tips

I would only introduce the idea of local and remote repositories after both these demos. Since you have just created a remote repository, the transition should be quite smooth. Simply clone or download the repository and continue working on it locally to convey the concept of a local repo.

Here are some common mistakes to avoid:

  • Demo version control from the command line;
  • Even worse getting the students to code along with you in the command line, chances are half of the students will get lost in spelling mistakes and not focus on the wider concepts;
  • Talking about branches and merges straight away;

I hope this was helpful and let me know in the comments what topic you want me to cover next!

Top comments (0)