Tagging¶
How the next tag is chosen¶
- Format.
--formatwins; otherwiseautodetects it from your last 20 tags by majority vote (ties go to the newest). Fresh repos start at triple with avprefix. - Previous tag. The highest version in that format (not just the newest date — back-tagged histories are handled).
- Bump.
major/minor/patchfrom the command line, falling back to config, defaulting topatch. - Flavor.
--pre(or config):stablemeans no suffix; otherwise-rc,-beta,-build,-nightly. Promotingv1.2.4-rcto stable yieldsv1.2.4(no bump); switching flavors swaps the suffix.
Formats¶
| Format | Looks like | Bumps |
|---|---|---|
triple |
v1.2.3 |
Per scale |
double |
v1.2 |
major bumps major, else minor |
single |
v7 |
Any scale bumps the number |
date |
v2026.10.04 |
Today's date (.N on collision) |
sha |
master-abc1234 |
Current short SHA |
sha-num |
master-99-abc1234 |
Commit count + short SHA |
custom |
Your template | Config only (see below) |
The v prefix follows your history: keep it if most tags have it.
Custom format (config only)¶
Set format: custom plus a custom: template. Tokens: MAJOR MINOR PATCH YEAR MONTH DAY DATE SHA FULLSHA COUNT PRE NUMBER TAG.
format: custom
custom: "build-<SHA>-v<MAJOR>.<MINOR>.<PATCH>-<DATE><PRE>"
No auto-detect for custom — explicit is on purpose.
Safety rails¶
- HEAD already tagged → aborts (exit 2) unless
-f. - Tag exists locally or remotely → aborts unless
-f(and never silently overwrites a push). - Dirty tree → warns and continues, unless
require_cleanis set (then it aborts). - No remote / offline → keeps the tag locally and tells you the exact
git pushto run later. --dry-run→ prints the plan, changes nothing. Use it liberally.doctor: true→ checks the remote for collisions before creating the tag, so a doomed tag never gets created locally.