Git Tagging & Releases
Tags are pointers to specific points in your repository's history, typically used to mark release versions.
Semantic Versioning (SemVer)
MAJOR.MINOR.PATCH (e.g., 2.3.1)
- MAJOR: Breaking changes.
- MINOR: New features (backwards compatible).
- PATCH: Bug fixes (backwards compatible).
Tagging Types
- Lightweight Tags: Just a pointer to a commit.
- Annotated Tags: Stored as full objects in the Git database. They include the tagger's name, email, and date. Best practice for releases.
Automation
Use tools like standard-version or semantic-release to:
- Analyze commit messages (Conventional Commits).
- Bump the version number.
- Create a Git tag.
- Generate an automated
CHANGELOG.md.
Value
Provides clear milestones for deployment and allows users to depend on specific versions of your software.