Session 12: Advanced GitHub

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

Slides | Source

License: CC BY 4.0

January 19, 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

Next week: DataLad Talk

Survey Participation

Please complete the surveys!

Looking Back: GitHub for collaboration

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

Today: More GitHub!

  1. Creating a README.md and committing changes on GitHub

  2. Forking workflow

  3. Optional: Tags and Releases

Your turn (Part 1)

Create a README.md

  1. Go to your repositories main page and click on add a README

  2. Use Markdown syntax and add the most important facts about the repository (link to our seminar website)

  3. Click on Commit changes and write a relevant commit message

Clean up your repository (optional)

If you have unnecessary files in your repository:

  1. Click on the file you want to delete and choose Delete file

  2. Commit the change and choose a commit message

  3. Pull the changes to your local repository

Your turn (Part 2)

  1. Find out what forking is
  2. Fork the recipes repository of another course participant (including Lennart or Konrad)
  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

Bonus exercise

  1. Read the Tags and Releases chapter
  2. Create a tag marking your recipe repository version
  3. Create a release of your “finished” repository on GitHub