Tags and Releases
Tags are a Git function used to make a snapshot of a repository. It is generally used to mark releases (e.g. v1.2.4), and functions like a shortcut to what the repo looked like at the time.
Releases are a feature independent of Git that allows you to attach files and release notes along and share it on Codeberg, linking to a Git tag.
They are very similar, the difference being that tags are just the repository frozen in time and are part of Git (You can make one using Git), releases are tags accompanied with a binary file and are not part of Git (You need to go to your Codeberg repository page to add the binary).
If you want to create tags it is recommended to do it using Git. You can also create tags during the release creation process on Codeberg. Releases can only be created from Codeberg.
Tags are generally labelled by version numbers. It is good practice to prefix a version number with a
v1.2.3) and to use the Semantic Versioning specification for assigning and incrementing version numbers.
To create a tag using git, use the following command in your repo folder.
git tag -a <tag name, e.g., a version number> -m "<my tag message>"
You can omit
"<my tag message>" to write a longer tag message in an editor window. Tags are not automatically pushed using
git push (comparable to branches). Thus, they have to be pushed manually to the remote target:
git push --tags <remote target, probably "origin">
--tags pushes all local tags to the remote target. If you want to push only a specific tag, use:
git push <remote target, probably "origin"> <tag name, e.g., "v1.2.3">
To create a release on Codeberg, first go to the
Releases tab of your repository, and click on
In the new page, enter a version number for your new release, select the branch that contains the code you want to release, add a title and a description:
You can either save as a draft, or publish the release outright.
You are then re-directed to the
Releases tab of your repository. The newly created release is now listed there:
Here you can edit the release if needed, and you can also download the source code in ZIP or TAR.GZ format.
To view the release, go to the releases tab (1) in the repository. Then locate the release you want to view. As an example, we will be looking at the
Added Knut! release (2). If you just want to access the files attached to the release, you can download it from the
Downloads dropdown (3).
If you want to see a snapshot of the source code at the time of the release, select a source code archive download (4) from the
Downloads dropdown or click on the tag on the left side (5).
Hey there! 👋 Thank you for reading this article!
Is there something missing or do you have an idea on how to improve the documentation? Do you want to write your own article?
For an introduction on contributing to Codeberg Documentation, please have a look at the Contributor FAQ.
© Codeberg Docs Contributors. See LICENSE