Session 11: GitHub: Collaboration

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

Slides | Source

License: CC BY 4.0

January 12, 2024

How are you today?

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

Looking Back: Introduction to GitHub

Today: Collaboration with GitHub

Example

Link to Issue

Your turn

Part 1

  1. Find a partner to work with today

  2. Give each other the rights to collaborate on your recipe repositories

  3. Create an issue on your partner’s repository (maybe their repo is missing a great recipe?)

Part 2

  1. Clone your partners repository

  2. Create a new branch and create one or multiple commits “fixing” the issue

  3. Push your changes to GitHub

Part 3

  1. Create a pull request with your changes and refer to the issue

  2. Close the pull request of your partner

Ask questions!

Let’s git started!

Bonus / Homework

  1. Find out what forking is
  2. Fork the recipes repository of another course participant (who is not your partner from the previous exercise)
  3. Repeat the steps from the previous exercise using the forked repository:
    1. Clone the forked repository
    2. Create a new branch and create one or multiple commits “fixing” the issue
    3. Push your changes to GitHub
    4. Create a pull request with your changes (hint: from the fork to the original repo) and refer to the issue

Learning questions

Some learning questions to pay attention to during the exercise:

  • How does forking differ from the previous approach to collaboration?
  • Did you notice any hurdles when comparing these different approaches to collaboration?
  • In which scenarios are different approaches to collaboration applicable?