Git: Tags & Releases
Objectives
💡 You understand why Git Tags matter in version control and project management.
💡 You know the difference between lightweight and annotated tags and how to apply them.
💡 You can push and pull tags to a remote repository (e.g., GitHub).
💡 You understand how GitHub releases complement Git Tags.
💡 You can use Zenodo to archive your repository and make your work citable.
Tasks
In this session, you will work on the following tasks:
- Reading: Read the chapter(s) Tags & Releases in the Version Control Book.
- Implementation: Try out the commands in the chapter.
- Exercises: Work on the exercises.
As always:
- Try out the commands of this session and play around with them.
- Check whether you have achieved the learning objectives.
- Ask questions!
Exercises
Task 1: Create a Tag
- Preparation: Clean-up your repo, merge any changes that you still want to integrate.
- Publish your repo: Go to “Settings”, click “General”, scroll down and change repository visibility.
- Create an annotated tag on the
mainbranch in yourmy-projectrepo namedv1.0.0. - Push the tag to GitHub.
Task 2: Create a Zenodo account and link it to GitHub
- Create a Zenodo account by visiting the Zenodo website and signing up.
- Link your GitHub account to Zenodo.
- Go to the GitHub section in the Zenodo sandbox and enable syncing your
my-projectrepository.
Task 3: Create a GitHub Release and mint a DOI
- Go to your repository on GitHub.
- Click on “Releases” then “Draft a new release”.
- Choose the tag
v1.0.0from the list. - Fill in the release title and description.
- Click “Publish release”.
- Go to the GitHub section in the Zenodo sandbox and look at your DOI.
Slides
To export 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.
Resources
- Version Control Book: Tags & Releases
- Zenodo – Open-access repository for research outputs
- GitHub Docs: About releases
- Making Your Code Citable by GitHub