Collaborative distributed version control

We have learned how to work with a Git repository used by a single person. What about sharing and collaborating?

  • Share the folder using email or using some file sharing service: This would lead to many back and forth emails and would be difficult to keep all copies synchronized.

  • One person’s repository on the web: Allows one person to keep track of more projects, gain visibility, feedback, and recognition.

  • Common repository for a group: Everyone can directly update the same repository. Good for small groups.

  • Forks or copies with different owners: Anyone can suggest changes, even without advance permission. Maintainers approve what they agree with.

Being able to share more easily (going down the above list) is transformative (easier to change something, that is you are not the sole owner) because it allows projects to scale to a new level.

We will discover and exercise the most typical workflows when collaborating using services like GitHub.

Prerequisites

  1. Basic understanding of Git.

  2. You need a GitHub account.

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.