The site that you are currently viewing is a static version of the Software Factory documentation delivered with the

version v7.2.
For up-to-date documentation, see the latest version.

Tagging

Marking releases and versioning strategies

tag logo

Introduction

Tagging is a crucial practice in software development to mark important points in the project history, such as versions, releases, or milestones. Tags provide a way to capture a snapshot of your codebase at a specific moment, making it easy to reference and retrieve that exact state later.

In the Software Factory, we use Git for source code management. Git tags are references that point to specific commits, helping to mark significant points in your project’s history.

Tag types in Git

Git provides two main types of tags:

  • Lightweight Tags:
    • Simple pointers to a specific commit without any additional metadata.
    • Usage: Often used for temporary or local purposes.
    • Creation Command: git tag <tagname>
  • Annotated Tags:
    • Full objects in the Git database that store extra information, such as the tagger’s name, email, date, and a message.
    • Usage: Preferred for marking releases and versions due to the additional metadata.
    • Creation Command: git tag -a <tagname> -m "message"

Pushing Tags to Remote

After creating tags locally, they need to be pushed to the remote repository to be shared with others.

git push origin <tagname>

To push all tags:

git push origin --tags
Recommendation

We recommend using Git tags as pipeline triggers for release and delivery activities. More on this in the GitLab documentation .

Versioning Strategies

Semantic versioning is a widely-adopted versioning scheme that conveys meaning about the underlying changes. It follows the pattern MAJOR.MINOR.PATCH.

  • MAJOR: Incompatible API changes.
  • MINOR: Backward-compatible new features.
  • PATCH: Backward-compatible bug fixes.

Example:

  • v1.0.0: Initial release.
  • v1.1.0: Adds new features in a backward-compatible manner.
  • v1.1.1: Fixes bugs without adding new features.