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}(/swc-releases/2016.06/hg-novice/01-backup/)

Setting Up Mercurial

Creating a Repository and Changing a File

Tracking Changes to Files

Exploring History and Recovering Old Versions

[Collaborating}(/swc-releases/2016.06/hg-novice/02-collab/)

[Conflicts}(/swc-releases/2016.06/hg-novice/03-conflict/)

[Open Science}(/swc-releases/2016.06/hg-novice/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.