Version Control with Mercurial: Instructor Notes

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}(../01-backup/)

Setting Up Mercurial

Creating a Repository and Changing a File

Tracking Changes to Files

Exploring History and Recovering Old Versions

[Collaborating}(../02-collab/)

[Conflicts}(../03-conflict/)

[Open Science}(../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.