Session 3: First steps with Git

Effective Progress Tracking and Collaboration: An Introduction to Version Control of Code and Data

Slides | Source

License: CC BY 4.0

November 3, 2023

How are you today?

Your mood on cat scale?

Last time: The command line

Source: Wikimedia Commons (free license)

Schedule

No Date Title Notes Contents Reading Survey
1 2023-10-20 Introduction to version control Organisational matters
Overview of seminar sessions
Computational reproducibility
Introduction to version control
Introduction to Git and its advantages
Intro to version control Course introduction survey
2 2023-10-27 Command line File Systems
Benefits of the Command Line
Basic Command Line commands
Command Line Command Line survey
3 2023-11-03 Git Basics Installation and configuration of Git
Initializing a Git repository
Basic Git commands
Ignoring files with .gitignore
Good commit messages

Installation, setup, first steps with Git Installation survey, Git Basics survey
4 2023-11-10 Cancelled Cancelled
5 2023-11-17 Basic Git workflow Practicing basic Git commands
Ignoring files with .gitignore
Good commit messages


First steps with Git Git Basics survey
6 2023-11-24 Cancelled Cancelled
7 2023-12-01 Quarto workshop Introduction to Quarto
Usecases as a scientist
Markdown Syntax
Using code chunks
Workshop Slides
8 2023-12-08 Git Branching and Merging Understanding branches in Git
Creating and switching between branches
Merging branches: fast-forward and recursive
Resolving merge conflicts
Stashing and retrieving changes
Undoing changes
Removing files
Branches Git branches survey
9 2023-12-15 Introduction to GitHub Introduction to remote repositories
Creating a GitHub account
Creating and managing repositories on GitHub
Cloning/Forking a remote repository
Pushing and pulling changes
Branching and merging in a collaborative environment
Graphical User Interfaces (GUIs), e.g., GitKraken
GitHub Intro GitHub Survey
10 2023-12-22 Repetition and practice Initializing repository
Staging and committing
Creating and merging branches
11 2024-01-12 GitHub: Collaboration Organizing Git repositories and projects
Collaborating with team members using issues and pull requests
Using pull requests
Understanding different Git workflows
Introduction to Gitflow workflow
Working with feature branches in Gitflow
12 2024-01-19 GitHub: Advanced, Tags/Releases README.md
Licenses
Contributions
Forking
Practicing GitHub workflow
Introduction to tags and their importance
Best practices for tagging in Git
Integration with Zenodo
13 2024-01-26 Introduction to DataLad - Version control of (large) datasets Guest Lecture by Adina Wagner (DataLad Developer & Project Lead of the DataLad Handbook)
14 2024-02-02 Summary & Wrap-Up Summary & Wrap-Up

Today’s chapter

lennartwittkuhn.com/version-control-book/chapters/first-steps-git.html

Your turn

  1. Content Review: Read the chapters “Setup” and “First steps with Git” in the Version Control Book
  2. Implementation: Try out the commands in the chapter! Play around! Have fun!
  3. Note: We will do the implementation exercises in class together, step-by-step.
  4. Exercises: Complete the exercises in the survey.

Ask questions!

Let’s git started!