This session
In this session, you will complete the following tasks:
- Complete the chapter “First steps with Git” in the Version Control Book.
- Complete the exercises for the
recipes
project. - Complete the quiz.
As always:
- Try out the commands in the chapter and play around with them.
- Check whether you have achieved the learning objectives.
recipes
project
At the end of this session, you should have accomplished the following:
- Commit at least three changes in
recipes.txt
. - 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.
- For example, add a recipe without a title first, commit, then add a title and use
- 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
- Everyone: Create a random file that you want to ignore, for example
- 🚀 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
To print the slides to PDF, do the following:
- Toggle into Print View using the E key (or using the Navigation Menu).
- Open the in-browser print dialog (CTRL/CMD+P).
- Change the Destination setting to Save as PDF.
- Change the Layout to Landscape.
- Change the Margins to None.
- Enable the Background graphics option.
- 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.