Fork me on GitHub
Credit and license

Collaborative distributed version control

In this lesson we will learn how to keep repositories in sync and how to work with remote repositories on GitHub and other services. We will discover and exercise the fork-pull request (or merge request) workflow, and finally look into how to automate tasks using Git hooks.

We will do this exercise on GitHub but also GitLab and Bitbucket allow similar workflows and basically everything that we will discuss is transferable. With this material and these exercises we do not endorse the company GitHub. We have chosen to demonstrate a number of concepts using examples with GitHub because it is currently the most popular web platform for hosting Git repositories and the chance is high that you will interact with GitHub-based repositories even if you choose to host your Git repository on another platform.

We also encourage course participants to use our new Nordic research software repository platform, for more information see


  1. Basic understanding of Git.

  2. You need a GitHub account.


09:00 Working with remotes How can we keep repositories in sync?
How can we share repositories with others?
09:30 Distributed version control How can we collaborate with people who we might not know yet?
What is a fork?
What is a pull request or merge request?
What is code review?
How do teams collaborate on GitHub or GitLab or Bitbucket?
10:30 Morning Coffee Break
10:50 Hooks How can we automate tasks depending on events in the Git repository?
10:55 Rebase and Fast Forward Does the cleanliness of branch history matter?
Why should we consider a rebase model?
When is it ok to Force Push?
11:25 Finish