Version Control with Mercurial: Instructor's Guide

Using a software tool to handle the versions of your project files lets you focus on the more interesting/innovative aspects of your project.

Overall

Version control may be the most important topic that we teach. We’re teaching Mercurial because it offers a consistent user interface, and the basic workflow requires only a few easy to remember commands.

There are lots of advanced features in Mercurial and other distributed version control systems such as branching, hashes, rebasing, etc. that we don’t teach. The goal is to introduce the basics so that the learners leave the workshop able to create and use repositories for themselves with confidence, and that they are aware that version control can also be used to collaborate with other people.

In other words, try to convince the learners that version control is useful for researchers working alone or in teams because it is

Teaching Notes

[A Better Kind of Backup}(https://douglatornell.github.io/hg-novice-2016-09-20-ubc/01-backup/)

Setting Up Mercurial

Creating a Repository and Changing a File

Tracking Changes to Files

Exploring History and Recovering Old Versions

[Collaborating}(https://douglatornell.github.io/hg-novice-2016-09-20-ubc/02-collab/)

[Conflicts}(https://douglatornell.github.io/hg-novice-2016-09-20-ubc/03-conflict/)

[Open Science}(https://douglatornell.github.io/hg-novice-2016-09-20-ubc/04-open/)

Licensing

We teach about licensing because questions about who owns what, or can use what, arise naturally once we start talking about using public services like Bitbucket to store files. Also, the discussion gives learners a chance to catch their breath after what is often a frustrating couple of hours.

Hosting

A common concern for learners is having their work publicly available on Bitbucket. While we encourage open science, sometimes private repos are the only choice. It’s always interesting to mention the options to have web-hosted private repositories.