Week 3: Git & GitHub

Author

Jelmer Poelstra

Published

March 15, 2024



2 Content overview

This week, you will learn about the why and how of using Git version control for your projects, and sharing your code on GitHub.

Be aware that Git is a challenging topic. Therefore, if you can, complete the main reading before Tuesday’s lecture, and also read the Buffalo chapter at some point this week.

A good way to get used to Git is to make dummy repositories where you’re just editing one or a few simple text files with dummy lines of text. That way, you can get used to the basic workflow, and freely experiment also with commands to undo things and move back in time. We’ll do this in our Zoom meetings and I recommend you do it outside of there, too.

Some of the things you will learn this week:

  • Understand why you should use a formal Version Control System (VCS) for research projects.
  • Learn the basics of the most widely used VCS: Git.
  • Learn how to put your local repositories online at GitHub, and how to keep local and online (“remote”) repositories in sync.
  • Learn about single-user and multi-user workflows with Git and GitHub.

Optional self-study content:

  • Learn how to use Git branches to safely make experimental changes.
  • Learn how to undo things and “travel back in time” for your project using Git.

3 Readings

This week’s main reading is the CSB chapter on Git, chapter 2. We will also roughly work our way through this chapter in the Zoom sessions.

The optional reading is the Buffalo chapter on Git, chapter 5. Like the CSB chapter, this starts with the very basics of Git; but it goes a bit further.

There are also some useful further resources mentioned below.

Required readings

  • CSB Chapter 2: “Version Control” up until section 2.5 (the rest of the chapter is optional).

Optional readings

  • Buffalo Chapter 5: “Git for Scientists”.

Further resources

Back to top