What is Gitlab?

Let’s take a simple example: You are working in a project group on an empirical paper and writing code. You have reached a final version of the script and are now doing a final check.

A shares the actual final version with B, C, D. C is overzealous and corrects one more thing and sends another final version back to A, B, and D. D finds another error and revises the final version from person C and sends it back to A, B, and C. On the other hand, B is a bit confused and edits the initial final version from A and sends it around to A, C, and D.

Just from the text, there should be chaos in your mind now, and you probably know this from group work. The image below also graphically illustrates the whole process.

Flow of Final Version
Flow of Final Version

What becomes clear here is that (especially, but not only) at the end of a project, there are more elegant ways than sharing files via email or through a cloud server (like Hessenbox). Even with cloud servers like Hessenbox or Dropbox, chaos cannot be completely avoided, as synchronous editing often leads to problems. And that’s exactly where Gitlab comes in for us.

{ /* examples */ }

Gitlab is a distribution of git (alongside github, for example) that is used in both business and academia. Gitlab offers an extensive workflow, but we will focus on the essentials (sharing and editing text files). Nevertheless, it is helpful to have an introduction to Gitlab here, as it is widely used in (IT) project work by many companies.

In our configuration, the goal with gitlab is to be able to track changes in text-based files, specifically in the R scripts (.R) in this case. Individuals can work on files simultaneously without major clashes as typically seen in Hessenbox, and all changes are globally saved, traceable, and can be made available to everyone. It is the perfect tool for working together collaboratively on a project (such as the group assignment in the exercise)! Just to clarify, you edit the files only locally on your computer or in RStudio, and once you are done, you release your changes so that others can see them too. You will learn the exact process at the end of this chapter.

Let’s dive into the JLU distribution of gitlab!