• Home
  • About
  • Schedule
  • Sessions
  • Team
  • Mechanics
  • Code of Conduct
  • Acknowledgements

Contents

  • This session
  • recipes project
  • Learning objectives
  • Slides

Basic Git workflow

Session 04

Starts at:

April 29 2024 (12:15 pm)

Slides Chapter: First steps with Git Quiz

This session

In this session, you will complete the following tasks:

  1. Complete the chapter “First steps with Git” in the Version Control Book.
  2. Complete the exercises for the recipes project.
  3. Complete the quiz.

As always:

  1. Try out the commands in the chapter and play around with them.
  2. Check whether you have achieved the learning objectives.

recipes project

At the end of this session, you should have accomplished the following:

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

Please keep the recipes folder! We will continue to use it in the following sessions.

Learning objectives

💡 You can initialize a Git repository
💡 You can stage and commit changes
💡 You know how to explore the commit history
💡 You can compare different commits
💡 You know how to use and create a .gitignore file
💡 You can discuss which files can (not) be tracked well with Git and why
💡 You know how to track empty folders in Git repositories

Slides

How can I download the slides as PDF?

To print 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:

Screenshot of Chrome print dialog with the first slide/page of 43 shown on the left, and print options on the right. The Destination print option has Save as PDF selected.

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

© 2023 – 2025 Dr. Lennart Wittkuhn
  • Acknowledgements
License: CC BY 4.0