Summary and Schedule
If you’ve never heard of or used version control and Git before this is the lesson for you. We’ll start by introducing version control and exploring how it can be beneficial to researchers, then we’ll introduce some useful tools and get started with some basic workflows using these tools. We’ll build on those foundations with collaborative exercises that introduce key concepts such as forks, pull requests and branches and give you the chance to get some hands-on experience with using version control in a research setting.
Prerequisites
We try not to assume too much knowledge in this lesson, making it suitable for all researchers, whatever your background. You can use either a graphical interface or a command line one, whichever you feel most comfortable with.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Introduction | What are the goals of this course? |
| Duration: 00h 12m | 2. The Basics: Working Alone |
How do I get a project under version control? How do I track changes to a set of files? |
| Duration: 00h 24m | 3. Remote Repositories |
How do I backup a repository? How do I share a repository with other people? |
| Duration: 00h 44m | 4. Undoing Changes | How do I undo changes to a repository? |
| Duration: 01h 14m | 5. Working with others |
How do I work on multiple things at the same time? How do I work with other people on the same repository? |
| Duration: 01h 44m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
This lesson uses either a graphical user interface (GUI) or the command line interface (CLI). You can use whichever one you’re most comfortable with.
There are many different interfaces to git, including
many built into code editors such as VS Code, PyCharm, Emacs, and so on.
We use GitHub Desktop here because its interface mostly closely maps to
the standard command line interface, meaning that learning it is mostly
easily transferable to other interfaces. Having just one interface also
makes it easier for us to teach!
Software Setup
If you’re using a managed Windows computer (for example, the desktops in the PC rooms), then both the GUI and CLI are available from the Software Centre.
If you’re using a managed Linux machine, then the CLI
git is most likely already installed.
Otherwise, you can download GitHub Desktop for the GUI, or command line git.
Creating a GitHub Account
You will need an account for GitHub to follow episodes 7 & 8 in this lesson.
- Go to https://github.com and follow the “Sign up” link at the top-right of the window.
- Follow the instructions to create an account.
- Verify your email address with GitHub.
- Configure multifactor authentication (see below).
Multi-factor Authentication
In 2023, GitHub introduced a requirement for all accounts to have multi-factor authentication (2FA) configured for extra security. Several options exist for setting up 2FA, which are summarised here:
- If you already use an authenticator app, like Google Authenticator or Duo Mobile on your smartphone for example, add GitHub to that app.
- If you have access to a smartphone but do not already use an authenticator app, install one and add GitHub to the app.
- If you do not have access to a smartphone or do not want to install an authenticator app, you have two options:
The GitHub documentation provides more details about configuring 2FA.