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

Contents

  • This session
    • Learning objectives
    • city-guide project
    • Exercises
      • “Private” collaboration with pull requests (using GitHub Flow)
      • Add a README.md
    • Slides
    • Cheatsheet

GitHub - Collaboration

Session 09

Starts at:

December 13 2024 (10:15 am)

Slides Chapter: GitHub - Advanced Quiz

This session

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

  1. Reading: Read the chapter(s) “GitHub - Advanced” in the Version Control Book.
  2. Implementation: Try out the commands in the chapter.
  3. Exercises: Work on the exercises for the city-guide project.
  4. Quiz: Test your knowledge with the quiz.

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!
  4. Let’s git started!

Learning objectives

💡 You know the purpose and components of a Pull Request.
💡 You know how to collaborate using the popular workflow strategy GitHub flow.
💡 You know the purpose and components of a README file.
💡 You can fork a repository.
💡 You can create a Pull Request from a forked repository.
💡 You can protect your main branch.

city-guide project

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

  1. You collaborated successfully on a shared project by adding and committing changes to a partner’s repository.
  2. You created and reviewed a pull request to integrate new content from a partner.

Please keep the city-guide folder! We will continue to use it in the following sessions.

Exercises

“Private” collaboration with pull requests (using GitHub Flow)

  1. Add your exercise partner as a collaborator to your project repository on GitHub.
  2. Clone your partner’s repository.
  3. Create a new branch in your collaborator’s repository.
  4. Add a new entry to your collaborator’s project file (e.g., .txt or .qmd (if you are unsure, where to add the entry, ask your collaborator!)
  5. Add and commit the changes.
  6. Push the changes on the new branch to the remote repository.
  7. Create a Pull Request (on GitLab: Merge Request).
  8. Review the Pull Request that your collaborator made in your repository.
  9. 🚀 Optional: Add additional changes on the branch pushed by your collaborator.
  10. Merge the pull request into your repository.

Add a README.md

  1. Find the option to create a new file on your remote repository in the browser.
  2. Name the file README.md, add a brief description, and provide a commit message.
  3. 🚀 Optional: Play around with Markdown syntax.
  4. Save the README.md file to the repository.
  5. Pull the changes to your local repository.

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.

Cheatsheet

Command Description
git blame Shows the authorship and commit information of each line in a file
© 2024 – 2025 Dr. Lennart Wittkuhn
  • Acknowledgements
License: CC BY 4.0