Git Tag Reference

Semantic versioning with git tags for EBRAINS projects.

Tag Format

Semantic Versioning

Version ComponentWhen to IncrementExample
MAJORBreaking changes (incompatible API changes)v1.0.0v2.0.0
MINORNew features (backward compatible)v1.0.0v1.1.0
PATCHBug fixes (backward compatible)v1.0.0v1.0.1

Creating Tags

Simple Tag (Lightweight)

Annotated Tag (Recommended)

Annotated Tag with Detailed Message

Tag Specific Commit

Version Examples

Release Tags

Pre-Release Tags

LabelStabilityExampleUsage
alphaVery lowv2.0.0-alpha.1Early testing, unstable
betaMediumv2.0.0-beta.1Feature complete, testing
rcHighv2.0.0-rc.1Release candidate, final testing

Managing Tags

List Tags

Push Tags

Delete Tags

Checkout Tag

Version Progression Examples

Patch Release (Bug Fix)

Minor Release (New Feature)

Major Release (Breaking Change)

Version Decision Matrix

Change TypeExampleVersion Bump
Fix a bugFixed crash on empty input1.2.31.2.4
Add optional parameterNew optional limit param1.2.31.3.0
Add new endpointPOST /api/export1.2.31.3.0
Remove endpointDeleted /api/old1.2.32.0.0
Change required field typeage from string to number1.2.32.0.0
Rename functiongetUserData → getUser1.2.32.0.0
Add new response fieldAdded createdAt field1.2.31.3.0
Change response structureNew error format1.2.32.0.0
Deprecate (not remove)Mark oldMethod deprecated1.2.31.3.0
Security patchFix SQL injection1.2.31.2.4

Pre-Release Version Ordering

NPM Version Commands

For Node.js projects, use npm to bump versions:

These commands automatically:

  • Update package.json version
  • Create a git commit
  • Create a git tag

Best Practices

Do

  • Use the v prefix for Git tags (e.g., v1.0.0)
  • Create annotated tags (not lightweight tags)
  • Write meaningful tag messages
  • Follow semantic versioning strictly
  • Document breaking changes clearly
  • Update CHANGELOG.md before tagging

Don’t

  • Don’t tag without updating version in package.json/files
  • Don’t reuse or change existing tags
  • Don’t skip versions (e.g., don’t jump from 1.0.0 to 1.2.0)
  • Don’t use tag names without semantic meaning
  • Don’t forget to push tags after creating them

Related Documentation