Session 1: Welcome & Introduction to Version Control

Track, organize and share your work: Version control of code & data with Git & DataLad

Course at AUDICTIVE Priority Program

Slides | Source

License: CC BY 4.0 DOI

09:30

1 Logistics & Admin

About

Me

📈 Now: Senior Specialist for Data & AI in the public sector at PD - Berater der Öffentlichen Hand

🧑‍🔬 Before: Postdoctoral Researcher at the Institute of Psychology at the University of Hamburg

🎓 Education: BSc Psychology & MSc Cognitive Neuroscience (TU Dresden), PhD Cognitive Neuroscience (MPIB)

🔬 Research: I studied the role of fast neural memory reactivation (“replay”) in the human brain using fMRI

🔗 Contact: You can connect with me via email, Mastodon, GitHub or LinkedIn

ℹ️ Info: Find out more about my work on my website, Google Scholar and ORCiD

This course

💻 Materials: All materials are available at https://lennartwittkuhn.com/version-control-course-audictive-2025/

📦 Software: Reproducible materials are built with Quarto and deployed to GitHub Pages using GitHub Actions

Source: Code is available on GitHub at https://github.com/lnnrtwttkhn/version-control-course-audictive-2025/

🙏 Contact: I am happy for any feedback or suggestions via email or GitHub issues. Thank you!

Who are you?

  1. Your name?
  2. Your preferred pronouns?
  3. Your research?
  4. Your mood on a sheep scale?

Mood on a sheep scale.

Course overview

  • Date: Tuesday, July 8th 2025
  • Time: 9:30 to 16:30
  • Room: Tagungshaus Erbacher Hof, Mainz

What will the average session look like?

The course consists of 6 main sessions (ca. up to 60 minutes each)

  1. Demonstration (up to 15 minutes):
    The instructor introduces the topic and gives a short demonstration of the main tools and practices.
  1. Exercises (up to 30 minutes):
    Course participants work on hands-on exercises and assignments.
  1. Discussions (up to 15 minutes):
    Course participants and instructor collectively address any questions related to the session’s content.

This is a workshop.

Schedule

No Time Title Contents
1 09:30 - 10:00 Introduction to Version Control Logistics and course admin
Introduction to reproducibility
Introduction to version control
Introduction to Git
2 10:00 - 10:45 Basics of the Command Line File systems and navigation
Benefits of the command line
Basic command line commands
3 10:45 - 11:00 Setup & configuration of Git Setup & configuration of Git
4 11:00 - 12:00 Basics of Git Initializing a Git repository
Practicing basic Git commands
Tracking changes wih Git
Ignoring files with .gitignore
Good commit messages
5 12:00 - 13:00 Lunch Break Enjoy your lunch!
6 13:00 - 14:00 Integration with GitHub / GitLab Introduction to remote repositories
Managing repositories on GitHub / GitLab
Pushing and pulling changes
Cloning a remote repository
7 14:00 - 15:00 Version Control of Data with DataLad Version control of (large) data with DataLad
Nesting modular datasets with DataLad
Establishing provenance and reproducibility with DataLad
8 16:00 - 16:30 Summary & Outlook Summary of course contents
Outlook to more related topics
Discussing open questions

Course website

https://lennartwittkuhn.com/version-control-course-audictive-2025/

Version Control Book

https://lennartwittkuhn.com/version-control-book

DataLad Handbook

https://handbook.datalad.org/en/latest/

Cheatsheets

Example cheatsheet: Basic Git commands

Command Description
git init Initializes a folder as a Git repository
git status Shows Git tracking status of files in the repository
git add Adds file(s) to the staging area
git commit Commits staged files
git commit -m "commit message" Commits staged files with a commit message

Pair Programming (variant)

  • Find and say hello to your nearest desk neighbor
  • Complete the exercises together, help each other out, etc.

This illustration is created by Scriberia with The Turing Way community. Used under a CC-BY 4.0 licence. DOI: 10.5281/zenodo.3332807

Course exercise (Git part): Building an online recipes book

https://lennartwittkuhn.com/recipes/

Let’s do the splits

Code of Conduct

During this course, we want to ensure a safe, productive, and welcoming environment for everyone who attends. All participants and speakers are expected to abide by this code of conduct. We do not tolerate any form of discrimination or harassment in any form or by any means. If you experience harassment or hear of any incidents of unacceptable behavior, please reach out to the course instructor, Dr. Lennart Wittkuhn (lennart.wittkuhn@tutanota.com), so that we can take the appropriate action.

Unacceptable behavior is defined as:

  • Harassment, intimidation, or discrimination in any form, verbal abuse of any attendee, speaker, or other person. Examples include, but are not limited to, verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, national origin, inappropriate use of nudity and/or sexual images in public spaces or in presentations, or threatening or stalking.
  • Disruption of presentations throughout the course. We ask all participants to comply to the instructions of the speaker with regard to dedicated discussion space and time.
  • Participants should not take pictures of any activity in the course room without asking all involved participants for consent and receiving this consent.

A first violation of this code of conduct will result in a warning, and subsequent violations by the same person can result in the immediate removal from the course without further warning. The organizers also reserve the right to prohibit attendance of excluded participants from similar future workshops, courses or meetings they organize.

Breaks

  • We will have a one-hour lunch break at 13:00.
  • Feel free to take short breaks in-between (sessions) when needed.

Learning objectives

At the end of this session, you should have achieved the following learning objectives:

Reproducibility

💡 You know what reproducibility is.
💡 You can argue why reproducibility is useful for research.
💡 You can explain the difference between reproducibility and replicability.

Version Control

💡 You know what version control is.
💡 You can argue why version control is useful (for research).
💡 You can name benefits of Git compared to other approaches to version control.
💡 You can explain the difference between Git and GitHub.

Learning objectives

Reproducibility

💡 You know what reproducibility is.
💡 You can argue why reproducibility is useful for research.
💡 You can explain the difference between reproducibility and replicability.

Version Control

💡 You know what version control is.
💡 You can argue why version control is useful (for research).
💡 You can name benefits of Git compared to other approaches to version control.
💡 You can explain the difference between Git and GitHub.

2 Introduction to Reproducible Research

Definition of reproducibility

Research is reproducible …

“… when the same analysis steps performed on the same dataset consistently produce the same answer.” 1

by Scriberia for The Turing Way Community (2022) (Link, CC BY 4.0)

by Scriberia for The Turing Way Community (2022) (Link, CC BY 4.0)
  • In short: Someone else can run your analysis on their computer and gets the same results
  • Reproducibility as a minimal requirement for research?
  • This course: Focus on computational reproducibility

Current state of reproducibility in (psychological) research

Artner et al. (2021)

  • Analyzed 46 articles from three APA journals in 2012.
  • Extracted 232 statistical claims from these papers.
  • Successfully reproduced 163 statistical results (70%).
  • Focus: Reproducibility of individual statistical claims.

Hardwicke et al. (2021)

  • Analyzed 25 articles published in Psychological Science (2014–2015) with Open Data Badges.
  • 15 articles (60%) were fully reproducible.
  • 9 out of these 15 (60%) were reproducible without author involvement.
  • Focus: Study-level reproducibility.

Crüwell et al. (2023)

  • Investigated 14 articles from a more recent issue of Psychological Science.
  • Only 1 out of 14 articles was exactly reproducible.
  • 3 additional articles were essentially reproducible with minor deviations.
  • All articles had Open Data Badges.

Obels et al. (2020)

  • Analyzed 62 registered reports in Psychology (2014-18).
  • 36 reports (58%) shared both data and code.
  • Of those, 21 (58%) were found to be reproducible.
  • Focus: Impact of open science practices on reproducibility.

The issue of computational reproducibility in science

“… when the same analysis steps performed on the same dataset consistently produce the same answer.” 2

by Scriberia for The Turing Way Community (2022) (Link, CC BY 4.0)

The problem

  • about more than half of research is not reproducible 3
    • research data, code, software & materials are often not available “upon reasonable [sic] request”
    • if resources are shared, they are often incomplete
  • 90% of researchers: “reproducibility crisis” (N = 1576) 4

Why?

  • computational reproducibility is hard
  • researchers lack training
  • incentives are not (yet) aligned 5
  • more …

… accumulated evidence indicates […] substantial room for improvement with regard to research practices to maximize the efficiency of the research community’s use of the public’s financial investment.(Munafò et al., 2017)

We need a professional toolkit for digital research!

What about Open Science?

Open science is an umbrella term for activities that aim to promote open approaches to science and research.

by Robin Champieux (CC BY 4.0)
  • Note: Research can be reproducible but not open
  • This course: Focus on better transparency and more effective collaboration through version control

What can we do?

No Time Title Contents
1 09:30 - 10:00 Introduction to Version Control Logistics and course admin
Introduction to reproducibility
Introduction to version control
Introduction to Git
2 10:00 - 10:45 Basics of the Command Line File systems and navigation
Benefits of the command line
Basic command line commands
3 10:45 - 11:00 Setup & configuration of Git Setup & configuration of Git
4 11:00 - 12:00 Basics of Git Initializing a Git repository
Practicing basic Git commands
Tracking changes wih Git
Ignoring files with .gitignore
Good commit messages
5 12:00 - 13:00 Lunch Break Enjoy your lunch!
6 13:00 - 14:00 Integration with GitHub / GitLab Introduction to remote repositories
Managing repositories on GitHub / GitLab
Pushing and pulling changes
Cloning a remote repository
7 14:00 - 15:00 Version Control of Data with DataLad Version control of (large) data with DataLad
Nesting modular datasets with DataLad
Establishing provenance and reproducibility with DataLad
8 16:00 - 16:30 Summary & Outlook Summary of course contents
Outlook to more related topics
Discussing open questions

3 Introduction to Version Control

Scenario 1

Imagine a scenario where you crafted a brilliant paragraph for a manuscript (for example, your paper, thesis, or report), but then accidentally ruined it. How would you retrieve the earlier brilliant version? Is it even possible?

  • “Only if I saved it before - otherwise, I’d have to draft another brilliant paragraph.”
  • “I might be able to find it in a cloud backup, like OneDrive or Google Drive.”
  • “Version Control?”
  • “I’d simply revert to the relevant commit.”

Scenario 2

Consider a situation where you are working with five co-authors on a paper. How do you handle the changes and comments they make to the document? If you’re using LibreOffice Writer or Microsoft Word and you accept changes made using the “Track Changes” option, what happens to the history of those modifications?

  • “I always save new versions of files with my initials (and others’ initials when I receive the document), which often results in having 10–20 different file versions.”
  • “I believe the history of modifications is lost after accepting the changes …”

Why we need version control …

… for code (text files) © Jorge Cham (phdcomics.com)

… for data (binary files) © Jorge Cham (phdcomics.com)

When everything is relevant …

… track everything.

What is version control?

“Version control is a systematic approach to record changes made in a […] set of files, over time. This allows you and your collaborators to track the history, see what changed, and recall specific versions later […]” (Turing Way)

keep track of changes in a directory (a “repository”)

take snapshots (“commits”) of your repo at any time

know the history: what was changed when by whom

compare commits and go back to any previous state

work on parallel “branches” & flexibly “merge” them

“push” your repo to a “remote” location & share it

share repos on platforms like GitHub or GitLab

work together on the same files at the same time

others can read, copy, edit and suggest changes

make your repo public and openly share your work

What are Git and DataLad?

  • most popular version control system
  • free, open-source command-line tool
  • graphical user interfaces exist, e.g., GitKraken
  • standard tool for most (all?) software developers
  • 100 million GitHub users 6
  • “Git for (large) data”
  • free, open-source command-line tool
  • builds on top of git and git-annex
  • allows to version control arbitrarily large datasets 7
  • graphical user interface exists: DataLad Gooey

What is GitHub?

  • cloud-based platform for version control using Git
  • allows for collaboration on coding projects in real time
  • hosts millions of public and private repositories
  • supports both Git command line and GUI tools (e.g., GitHub Desktop)
  • enables code sharing, project management, issue tracking, and continuous integration
  • used by companies, open-source communities, and individual developers worldwide
  • 100 million users 8

More benefits of Git(Hub) for project management

  • Discuss and plan your project in issues (even just with your future / past self)
  • Ask questions, share ideas and discuss with your community via GitHub Discussions
  • Propose changes to each other’s projects using pull requests 9
  • Create a fork of someone else’s repository and extend their work
  • Manage access to your projects with detailed permissions and roles
  • Add documentation to your repository or in a separate wiki
  • Access to more features and tools for teaching via GitHub Campus Global

Note

  • The dominance of GitHub (a for-profit company owned by Microsoft) is not uncontested (see #GiveUpGitHub)
  • A project on GitHub is not a FAIR archiving of scholarly outputs (see previous and following slides)

4 Outlook

Goal

From this …

To this …

Schedule

No Time Title Contents
1 09:30 - 10:00 Introduction to Version Control Logistics and course admin
Introduction to reproducibility
Introduction to version control
Introduction to Git
2 10:00 - 10:45 Basics of the Command Line File systems and navigation
Benefits of the command line
Basic command line commands
3 10:45 - 11:00 Setup & configuration of Git Setup & configuration of Git
4 11:00 - 12:00 Basics of Git Initializing a Git repository
Practicing basic Git commands
Tracking changes wih Git
Ignoring files with .gitignore
Good commit messages
5 12:00 - 13:00 Lunch Break Enjoy your lunch!
6 13:00 - 14:00 Integration with GitHub / GitLab Introduction to remote repositories
Managing repositories on GitHub / GitLab
Pushing and pulling changes
Cloning a remote repository
7 14:00 - 15:00 Version Control of Data with DataLad Version control of (large) data with DataLad
Nesting modular datasets with DataLad
Establishing provenance and reproducibility with DataLad
8 16:00 - 16:30 Summary & Outlook Summary of course contents
Outlook to more related topics
Discussing open questions

Prerequisite: Basics of the command line

Source: Wikimedia Commons (free license)

References

Artner, R., Verliefde, T., Steegen, S., Gomes, S., Traets, F., Tuerlinckx, F., & Vanpaemel, W. (2021). The reproducibility of statistical results in psychological research: An investigation using unpublished raw data. Psychological Methods, 26(5), 527–546. https://doi.org/10.1037/met0000365.
Baker, M. (2016). 1,500 scientists lift the lid on reproducibility. Nature, 533(7604), 452–454. https://doi.org/10.1038/533452a.
Crüwell, S., Apthorp, D., Baker, B. J., Colling, L., Elson, M., Geiger, S. J., Lobentanzer, S., Monéger, J., Patterson, A., Schwarzkopf, D. S., Zaneva, M., & Brown, N. J. L. (2023). Whats in a Badge? A Computational Reproducibility Investigation of the Open Data Badge Policy in One Issue of Psychological Science. Psychological Science, 34(4), 512–522. https://doi.org/10.1177/09567976221140828.
Hardwicke, T. E., Bohn, M., MacDonald, K., Hembacher, E., Nuijten, M. B., Peloquin, B. N., deMayo, B. E., Long, B., Yoon, E. J., & Frank, M. C. (2021). Analytic reproducibility in articles receiving open data badges at the journal Psychological Science : an observational study. Royal Society Open Science, 8(1). https://doi.org/10.1098/rsos.201494.
Munafò, M. R., Nosek, B. A., Bishop, D. V. M., Button, K. S., Chambers, C. D., Percie du Sert, N., Simonsohn, U., Wagenmakers, E.-J., Ware, J. J., & Ioannidis, J. P. A. (2017). A manifesto for reproducible science. Nature Human Behaviour, 1(1). https://doi.org/10.1038/s41562-016-0021.
Obels, P., Lakens, D., Coles, N. A., Gottfried, J., & Green, S. A. (2020). Analysis of Open Data and Computational Reproducibility in Registered Reports in Psychology. Advances in Methods and Practices in Psychological Science, 3(2), 229–237. https://doi.org/10.1177/2515245920918872.
Poldrack, R. A. (2019). The Costs of Reproducibility. Neuron, 101(1), 11–14. https://doi.org/10.1016/j.neuron.2018.11.030.
The Turing Way Community. (2022). The turing way: A handbook for reproducible, ethical and collaborative research. Zenodo. https://doi.org/10.5281/zenodo.3233853.
Wicherts, J. M., Borsboom, D., Kats, J., & Molenaar, D. (2006). The poor availability of psychological research data for reanalysis. American Psychologist, 61(7), 726–728. https://doi.org/10.1037/0003-066x.61.7.726.

Footnotes

  1. The Turing Way Community (2022), see “Guide on Reproducible Research”

  2. The Turing Way Community (2022), see “Guide on Reproducible Research”

  3. for example, in Psychology: Crüwell et al. (2023); Hardwicke et al. (2021); Obels et al. (2020); Wicherts et al. (2006)

  4. see Baker (2016), Nature

  5. see e.g., Poldrack (2019)

  6. (Source: Wikipedia)

  7. see DataLad dataset of 80TB / 15 million files from the Human Connectome Project (see details)

  8. (Source: Wikipedia)

  9. pull requests on GitHub, merge requests on GitLab