Version Control with Git

Date 1 - 3 March 2022
Speaker(s) Robin Engler, Roman Mylonas
ECTS 0.5
Fees *academic: 120 CHF   -   for-profit: 600 CHF
Cancellation deadline 18 Feb 2022
City Lausanne
*academic fee includes non for-profit organisations as well as unemployed participants at the time of application.

Overview

Git is an open source, distributed, version control system for tracking changes in source code and other types of text documents. Created by Linus Torvald and first released in 2005, Git has become the de-facto standard for project source code management, and is extensively used both in open source and commercial software development. The usage of Git is not limited to code development, but can also be used to keep track of data analysis scripts and pipelines. This 2.5 day course gives a comprehensive introduction to Git and its most useful commands.

Audience

This course is aimed at people with no or little knowledge of Git, who are interested in using a version control system for collaborative work, or simply to keep track of modifications in their scripts/code base/files. This obviously includes people working on code development, but also scientists interested in improving the reproducibility of their data analyses by keeping track of their scripts using a version control system.

Learning objectives

At the end of the course, the participants are expected to have understood and practiced the following:

  • Introduction to Version Control Systems.
  • Basic Git concepts: commits, the HEAD pointer and the Git index.
  • Git branches: introduction to branched workflows and collaborative workflow examples.
  • Branch management: merge, rebase and cherry-pick.
  • Retrieving data from the Git database: git checkout.
  • Working with remotes: share your work and collaborate.
  • Basics of GitHub and GitLab.

Prerequisites

Knowledge/competencies:

The course is focused on using Git in command line mode (no graphical user interface). It is therefore necessary to have some basic knowledge of UNIX command line, e.g. how to change directory or how to edit a file in a command line editor such as vim/nano. If you are not familiar with these UNIX fundamentals, we strongly recommend that you follow an introductory UNIX course (e.g. First Steps with UNIX for Life Sciences that will take place on 27 September, or take the following online tutorial before the start of the course. .

Technical

A Wi-Fi enabled laptop with a recent version of Git installed. Git is available on all major platforms (https://git-scm.com/download).

Schedule

Day 1:

  • Introduction to Version Control Systems.
  • Basic Git concepts: commits, the HEAD pointer and the Git index.
  • Git branches: introduction to branched workflows and collaborative workflow examples.
  • Branch management: merge, rebase and cherry-pick.
  • Retrieving data from the Git database: git checkout.
  • Working with remotes: collaborating with Git.
  • A brief introduction to GitHub.

Day 2:

  • Rewriting history: interactive rebase, git reset and commit amending.
  • Detached HEAD state explained.
  • The Git stash: Git’s “cut and paste” functionality.
  • Git tags: label important commits.
  • A look under Git's hood: the Git object store.

Day 3 (half-day):

The last half-day of the course is optional and covers two Git extensions that can be useful in certain scenarios:

  • Git LFS: versioning large files with Git.
  • Git submodules: nesting Git repositories within as a sub-directory of another Git repository.

Application

Registrations for this course are not yet open.

Registration fees for academics are 120 CHF.

Deadline for free-of-charge cancellation is set is set to 18/02/2022. Cancellation after this date will not be reimbursed. Please note that participation to SIB courses is subject to our general conditions.

You will be informed by email of your registration confirmation.

Venue and Time

The course will take place at the University of Lausanne and start at 9:00 CET and end around 17:00/17:30 CET. The participants will get detailed information before the course.

Additional information

Coordination: Grégoire Rossier

We will recommend 0.5 ECTS credits for this course (given a passed exam at the end of the course).

You are welcome to register to the SIB courses mailing list to be informed of all future courses and workshops, as well as all important deadlines using the form here.

For more information, please contact training@sib.swiss.