Session 12: Tags, Releases & Publication

Track, organize and share your work: An introduction to Git for psychological research

Course at University of Hamburg

Slides | Source

License: CC BY 4.0 DOI

June 24 2024 (12:15 pm)

1 Schedule

Schedule

No Date Title Contents Reading Survey/Quiz
1 2024-04-08 Introduction to version control Organisational matters
Overview of seminar sessions
Introduction to version control
Introduction to Git and its advantages
Intro to version control Course introduction Survey
2 2024-04-15 Command line File Systems
Benefits of the Command Line
Basic Command Line commands
Command Line Command Line Quiz
3 2024-04-22 Setup + Git Fundamentals Installation and configuration of Git
Initializing a Git repository
Basic Git commands
Installation, Setup, First steps with Git Installation Survey, Git Basics Quiz
4 2024-04-29 Basic Git workflow Practicing basic Git commands
Ignoring files with .gitignore
Good commit messages
First steps with Git Git Basics Quiz
5 2024-05-06 Git Branching and Merging Understanding branches in Git
Creating and switching between branches
Merging branches
Resolving merge conflicts
Branches Git Branches Quiz
6 2024-05-13 Quarto Workshop Introduction to Quarto
7 2024-05-20 Whit Monday Cancelled
8 2024-05-27 Introduction to GitHub Introduction to remote repositories
Creating a GitHub account
Creating and managing repositories on GitHub
Pushing and pulling changes
GitHub Intro GitHub Quiz
9 2024-06-03 GitHub with collaborators Cloning a remote repository
Branching and merging in a collaborative environment
Pull Requests
GitHub Issues
Graphical User Interfaces (GUIs), e.g., GitKraken
GitHub Intro, GitHub Issues GitHub Quiz
10 2024-06-10 GitHub with the world Forking a remote repository
README files
Project Management
GitHub Intro, GitHub Issues GitHub Quiz
11 2024-06-17 Repetition and Practice Repetition and Practice
12 2024-06-24 Publishing Creating Tags with Git
Creating Releases with GitHub
Using Zenodo for scientific publishing
Licences
Citation Files
Tags and Releases
13 2024-07-01 Graphical User Interfaces (cancelled) Repetition and Practice
Introduction to using GUIs
Graphical User Interfaces
14 2024-07-08 Summary & Wrap-Up Course evaluation
Repetition and Practice
Introduction to using GUIs
Graphical User Interfaces

2 Last session: Repetition & Practice

Last session: Repetition & Practice

https://github.com/lnnrtwttkhn/recipes/pulls

Questions about the last session?

3 This session’s topic: Tags & Releases

Today’s topic: Tags & Releases

https://lennartwittkuhn.com/version-control-book/chapters/tags-and-releases.html

4 Tags & Releases: Examples

Example 1: MATLAB code for an experimental task in research

https://github.com/lnnrtwttkhn/highspeed-task

See Code Availability Statement of paper:

All code to run the behavioral task can be found at (https://github.com/lnnrtwttkhn/highspeed-task; https://doi.org/10.5281/zenodo.4305888)

Advantages

  1. Reusability: Code is on GitHub and can be forked, reviewed, reused, extended, etc.
  2. Reproducibility: The specific version that was used in the original study is tagged.
  3. Modularity: Other researchers can independently reuse only the code for the experimental task.
  4. Backup: Code can be accessedd in at least two locations.
  5. Independence: If GitHub disappears, a copy of the code is still on Zenodo.
  6. Recognition: Other researchers can cite the code + views and downloads metrics on Zenodo.

Example 2: Code releases in software development

https://github.com/lnnrtwttkhn/version-control-book/releases/tag/v1.0

Advantages (non-exhaustive list)

  • Automated Change Log based on PR titles
  • Automated appreciation of new contributors

This session’s learning objectives

💡 Understand why Git tags matter in version control and project management
💡 Learn when to use lightweight or annotated tags and how to apply them
💡 Get the hang of pushing and pulling tags in Git for seamless teamwork
💡 Explore how GitHub releases complement Git tags
💡 Discover how to use Zenodo to make your repository citable

Your turn

  1. Content Review: Read the chapter “Tags & Releases” in the Version Control Book.
  2. Implementation: Try out the commands in the chapter! Play around! Have fun!.
  3. Note: Please complete the implementation exercises on the next slide.

Ask questions!

Let’s git started!

5 Demo exercise

recipes project

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

  1. You created an annotated Tag and a GitHub Release.
  2. You linked the release to Zenodo’s sandbox and minted a DOI.

Implementation Exercises

Task 1: Create a Tag

  1. Preparation: Clean-up your repo, merge any changes that you still want to integrate
  2. Publish your repo: Go to “Settings”, click “General”, scroll down and change repository visibility
  3. Create an annotated tag on the main branch in your recipe repo named v1.0.0.
  4. Push the Tag to GitHub
  1. Create a Zenodo account by visiting the Zenodo website and signing up.
  2. Link your GitHub account to Zenodo
  3. Go to the GitHub section in the Zenodo sandbox and enable syncing your recipes repository

Task 2: Create a GitHub Release and mint a DOI

  1. Go to your repository on GitHub.
  2. Click on “Releases” then “Draft a new release”.
  3. Choose the tag v1.0.0 from the list
  4. Fill in the release title and description.
  5. Click “Publish release”.
  6. Go to the GitHub section in the Zenodo sandbox and look at your DOI

Next week: Practice with GUIs (+ course evaluation!)

… following popular request

Integrated Development Environments (IDEs)

RStudio

MATLAB

Git Clients

GitKraken

GitHub Desktop

Mobile

Working Copy (iOS)

Homework

  1. Sign-up for GitHub Education to get access to the Student Developer Pack
  2. Install GitKraken and sign-up with your GitHub account
  3. 🚀 Optional: Check out other Git GUIs that you’d like to try (e.g., RStudio)