• Home
  • About
  • Schedule
  • Sessions
  • Code of Conduct

Contents

  • Objectives
  • Tasks
  • Exercises
    • First steps with Git
    • Basic Git workflow
  • Slides
  • Resources

Git: Basics

Starts at:

Friday, 11:15

Objectives

πŸ’‘ You can initialize a Git repository.
πŸ’‘ You can check the status of a Git repository.
πŸ’‘ You understand the difference between the staging area and a commit.
πŸ’‘ You can stage and commit changes.
πŸ’‘ You understand the difference between a commit message and a description.

Tasks

In this session, you will work on the following tasks:

  1. Reading: Read the chapter(s) First steps with Git (Optional: Git Essentials) in the Version Control Book.
  2. Implementation: Try out the commands in the chapter.
  3. Exercises: Work on the exercises.

As always:

  1. Try out the commands of this session and play around with them.
  2. Check whether you have achieved the learning objectives.
  3. Ask questions!

Exercises

First steps with Git

  1. Create a my-project folder and turn it into a Git repository.
  2. Make changes to the files and folders in your project.
  3. Stage and commit your changes to the repository.

Basic Git workflow

  1. Commit at least three additional changes in your files.
  2. Create a .gitignore file
    • Everyone: Create a random file that you want to ignore, for example random-file.docx.
    • Add the random file to the .gitignore file, stage and commit your changes.
    • All macOS users: Let your repository ignore .DS_Store.
  3. πŸš€ Make at least one commit using git commit --amend.
    • For example, add file without a title first, commit, then add a title and use git commit --amend to add the title change to the same commit.
  4. πŸš€ Optional: Commit .gitkeep in an otherwise empty directory

Slides

NoteHow can I download the slides as a PDF file?

To export the slides to PDF, do the following:

  1. Toggle into Print View using the E key (or using the Navigation Menu).
  2. Open the in-browser print dialog (CTRL/CMD+P).
  3. Change the Destination setting to Save as PDF.
  4. Change the Layout to Landscape.
  5. Change the Margins to None.
  6. Enable the Background graphics option.
  7. Click Save.

Note: This feature has been confirmed to work in Google Chrome, Chromium as well as in Firefox.

Here’s what the Chrome print dialog would look like with these settings enabled:

These instructions were copied from the Quarto documentation (MIT License) and slightly modified.

Resources

  • Version Control Book: First steps with Git
  • Version Control Book: Git Essentials
  • Pro Git: Chapter 2 – Git Basics by Scott Chacon and Ben Straub

Β© 2026 Dr. Lennart Wittkuhn

 

License: CC BY 4.0