**Subject: [RFC] Adding a native, opt-in versioning system to Git (distinct from tags and branch names)**
Dear Git developers and contributors,
I’d like to start a focused discussion about whether Git could benefit from a first-class, **opt-in** versioning mechanism that is separate from the current tagging system and from human-readable branch names.
### Core observation Git is an extremely powerful content-addressable history tracker, but it deliberately does not provide built-in semantic or numeric versioning of commits or branches. Projects therefore reinvent versioning in many different ways (tags + git-describe, VERSION files, external tools, custom branch naming conventions, etc.). While these solutions work, they remain conventions rather than enforceable, machine-readable primitives.
### Proposed feature (high-level) Introduce an optional versioning subsystem that can be enabled per-repository (default: disabled) with configuration such as:
```ini [version] enabled = false|true format = decimal|semver|custom ; e.g. 1.234 or 2025.11.17 or free-form auto-increment = none|patch|minor|master-only ```
When enabled, every new commit could carry an explicit, mutable version identifier that is **independent** of:
- the commit SHA-1 - lightweight or annotated tags - branch names
Possible technical directions (open for discussion):
1. Store the version in an extra header in the commit object (`Version: 1.042`) – simple, visible in `git cat-file commit`, travels with the commit when pushed/pulled.
2. Maintain a dedicated ref namespace (`refs/version/HEAD` or `refs/version/<branch>`) that is updated automatically or via explicit commands.
3. A separate “version object” type linked from the commit.
New porcelain commands (all no-ops when the feature is disabled):
```sh git version # show version of current commit, or “unversioned” git version bump [major|minor|patch|decimal] # create new commit with incremented version git version set <v> # explicitly set a version on a new commit ```
### Desired properties - Completely optional and disabled by default – existing repositories and workflows are unaffected. - Orthogonal to tags (a commit can have both a tag v2.3.1 and an explicit version 2025.11.17). - Survives rebase, cherry-pick, amend, etc., unless explicitly changed. - Can be ignored by tools that do not understand it. - Allows projects to have a single source of truth for “what version am I looking at right now?” without parsing tags or running git-describe.
### Potential benefits - Standardised, scriptable way to obtain the current version in builds, CI, packaging tools. - Easier generation of reproducible build artefacts and release notes. - Possibility to enforce version ordering or policies via hooks if desired. - Reduces the need for complex branch-naming conventions that try to encode version/author information.
### Questions for the list 1. Is there interest in adding such a native (but opt-in) versioning facility to Git core, or is the current ecosystem of tags + external tools considered sufficient? 2. If there is interest, which storage approach would be least disruptive and most future-proof? 3. Should automatic incrementing (e.g. “bump patch level on every commit to main”) be part of core, or left to porcelain / hooks? 4. Are there strong objections (technical, philosophical, or maintenance-burden) to adding any form of mutable version metadata to commits?
This is deliberately an early RFC – no patch series yet – because the design space is large and community feedback will heavily influence whether this is worth pursuing.
Thank you for your time and thoughts.
Best regards, Skybuck Flying (The Netherlands) November 17, 2025