Welcome to the home page of the Introduction to Git course of the University of Lausanne CAS in data stewardship.
This one-day course provides an introduction to the open source Git version control system.
- Please complete the environment setup instructions before the start of the course.
- In particular, make sure to communicate us your GitHub user name at least 2 days before the start of the course - see the environment setup instructions for details.
Git is an open source version control system for tracking changes in code and other types of text documents. First released in 2005, Git has become the de-facto standard for version control, and is extensively used in both open source and commercial software development.
Git is not limited to software development, and has proved to be an essential tool in reproducible research - allowing to keep track of files such as data analysis scripts, pipelines, reports or more generally any text-based document.
This one-day course gives a short introduction to Git and its most useful commands, as well as an introduction to collaborative workflows using GitHub through both theory and practical exercises.
Specifically, the course will cover the following topics:
- Git basics: creating a Git repository, making commits, and displaying a repository's history.
- Git concepts: commits, the HEAD pointer and the Git index.
- Git branches: introduction to branched workflows and collaborative workflow examples. Branch management: create and merge branches. Working with remotes: collaborating with Git and GitHub.
Please note that this course focuses exclusively on using Git via command line, but this knowledge is easily transferrable to any GUI environment (e.g. VS Code, RStudio, etc.).
Because of its limited in-class time (0.5 days), this course requires participants to to self-study before and after the class.
Given the limited in-class teaching time available for this course (0.5 days), participants are required to prepare for the course ahead of time.
We therefore kindly ask you to complete the following tasks before the start of the course:
-
Setup your environment (~0.5h).
-
Reading list: as an introduction to Version control and Git, please read the following pages from the official Git documentation website:
-
Additionally, you can watch the following 2 short videos, also found on the official Git documentation website:
During the in-class part of the course, the following topic will be covered.
- Theory presentation (course slides).
- Exercises 1 and 2.
Exercises to do on your own, as post-course tasks.
- Finish exercises 1 and 2, including the "Additional Tasks" sections (~1h).
- Exercises 3 and 4, including the "Additional Tasks" sections (~3h).