Skip to content

Tutorial Objectives

This tutorial is made for researchers in psychology or neurosciences with little to no background in software development or no other computational expertise.

Topics 💡

Please try to reserve 3-4h of your time for this tutorial. If you plan on rushing through this tutorial, you will only get frustrated. I know that 3-4h seem like a lot of time, but after this tutorial you will be prepared for working collaboratively with Git and GitLab. This tutorial is created in a praxis-oriented manner and under every section you'll find tasks which are nice for getting some practice. Because: You can only learn Git and GitLab by actually doing it!!

This tutorial teaches to work with Git through the command line. This has the purpose to make you understand what's really going on when you communicate with Git. However, you are welcome to use one of the many Graphical User Interfaces (Git GUIs) for Git which are more user friendly than working with the command line.

Please be reminded that for going through this tutorial you need to have gone through the Installation and Setup part.

Version Control and Git: Background and Theory

Objectives📍

  • What Version Control is and where it comes from
  • Why it is useful
  • The basic principles of Git:
    • the Git database
    • structure of the Git repository
    • the staging area
    • commits

Basic Git Workflow

Objectives📍

  • init
  • add
  • commit
  • status
  • diff
  • log

Branching and merging

Objectives📍

  • branch
  • checkout
  • merge
  • HEAD and detached HEAD
  • moving in your commit history
  • how to solve a merge conflict

GitLab workflow

Objectives📍

  • What is GitLab
  • local vs. remote repository
  • push
  • pull
  • clone
  • fetch
  • merge
  • merge conflict between your local and remote repository

Contributing on GitLab

Objectives📍

  • fork
  • merge requests
  • gitlab for project management
  • git LFS

optional/reading/further materials