{"id":"442e03f9-b072-49f6-b486-edbe022eb5ab","task":"Get the nearest reachable tag / human-readable version name with git describe","domain":"git-scm.com","steps":["Describe current HEAD: `git describe` → outputs e.g. `v1.2.3-14-g2414721` (nearest annotated tag, +14 commits, short SHA).","Include lightweight tags too: `git describe --tags`.","Force long format even at an exact tag: `git describe --long` → `v1.2.3-0-g<sha>`.","Only the nearest tag, no suffix (useful for version bumps): `git describe --abbrev=0`.","Add -dirty marker when the working tree has local modifications: `git describe --dirty` → `v1.2.3-14-g...-dirty`.","Use with a specific rev instead of HEAD: `git describe <branch-or-sha>`."],"gotchas":["By default git describe only considers ANNOTATED tags (created with -a/-s); use --tags or --all to include lightweight refs.","The `-g` in the output stands for 'git' and disambiguates SCMs in version strings — it is not a typo.","--abbrev=0 gives the closest matching tag only; use --always to fall back to a bare SHA when no tag exists.","On a shallow/clone without tags you get 'fatal: No names found' — fetch tags or pass --always."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T17:27:44.370Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T17:27:44.370Z"},"url":"https://mcp.waymark.network/r/442e03f9-b072-49f6-b486-edbe022eb5ab"}