24 Days of
Open Science

Version Control with Git

Git is a free software for distributed version management of text-based files. Git registers differences between files and can therefore automatically and independently integrate changes in different places. You can work with Git purely locally to save versions of your work. However, the inclusion of central servers (so-called remote servers) also allows many participants to work together on the same files.

Git is therefore ideal for versioning and collaborative work in the context of research data management and the development of research software. It is mainly used for version management of software code, but is also suitable for collaborative writing of LaTeX documents or other text-based files.

GitHub, GitLab and Bitbucket are exemplary platforms that implement the server side of Git. GitHub currently provides a free platform on which projects ending dates can make their work publicly available. With GitLab, GitHub Enterprise or Bitbucket, you can set up or operate your own Git server.

Git is already included as a package in most Linux distributions. Under Windows, tools such as git bash (command line tool), TortoiseGit (integration into Windows Explorer) or SourceTree (graphical user interface) can be used.

Bielefeld University offers its own GitLab instance, which is available to researchers and employees of the university: https://gitlab.ub.uni-bielefeld.de/

Here you can find cheatsheets with the most important Git commands in various languages.

Here is a detailed Git documentation.

If you are interested in how Git can be used in research data management: Here are two training videos "Git einrichten" and "Git bedienen", which were created as part of Forschungsdatenmanagement Bayern (only available in German).

Here is a training session on learning Git from the Carpentries (English language).

Click here for games to learn Git: GitHub (English language) and Learn Git Branching (available in several languages, see button at the bottom right of the application).