Re: Missing Git Features for Modern Multi-Repository, Dependency-Driven Development
- From
Skybuck Flying <skybuck2000@hotmail.com>
- Date
- Jun 1, 2026, 21:32 UTC
- Message-ID
- <AM0PR02MB445082932A5ED69B5F6EA782B3152@AM0PR02MB4450.eurprd02.prod.outlook.com>
- In-Reply-To
- <AM0PR02MB4450F6AF2F662C51F3145B48B3152@AM0PR02MB4450.eurprd02.prod.outlook.com>
Point 7 needs further explaining and this document will do so:
7. **Stable repository identity**
---
# ⭐ **SPECIFICATION: Stable Repository Identity for Git**
Modern software projects increasingly rely on large dependency graphs, multi‑repository structures, reproducible builds, and long‑term provenance. Git provides excellent version control but lacks native mechanisms for these workflows. This specification outlines optional, backward‑compatible metadata extensions that would allow Git to better support modern development practices.
This document contains four sections:
111. WHAT GIT SHOULD HAVE BEEN 222. RFC / PROPOSAL 333. IMPLEMENTATION IDEAS / DETAILS 444. EXAMPLES
---
# ⭐ **111. WHAT GIT SHOULD HAVE BEEN — Stable Repository Identity**
Git is brilliant at what it was designed for:
- content‑addressable storage - distributed history - immutable snapshots
But Git has one deep architectural flaw:
> **A repository’s identity = its URL.**
This has caused 15+ years of breakage across ecosystems:
- Go import paths break when repos move - mirrors confuse tooling - forks lose provenance - dependency manifests rot - security advisories become invalid - organizational migrations break everything - renames break imports and builds
Git treats the *transport location* as the *identity*. This is backwards.
---
## ⭐ **Basic Idea (3–5 lines)** Git breaks when a repository’s URL changes because the URL *is* the identity. The fix is to give every repo a permanent UUID stored in `.git/identity`. Tools then import using a stable name like `sky/yaml`, which Git maps to the UUID. If the repo moves, renames, or changes hosting, only the mapping updates — **the code stays the same**.
---
Git should have had:
### ✔ A stable, permanent identity ### ✔ Independent of URL ### ✔ Independent of hosting provider ### ✔ Independent of username ### ✔ Independent of organization ### ✔ Independent of mirrors and forks
This identity should have been:
- generated once - stored inside the repo - immutable - portable - cryptographically strong
Something like:
``` .git/identity uuid = "d8f1-9c2e-44b1-8f3a-abc123" ```
This would have allowed:
- renaming - moving - mirroring - forking - reorganizing - migrating hosts
**without breaking anything.**
Git should have been built on **stable identity**, not URLs.
---
# ⭐ **222. RFC: Stable Repository Identity for Git**
## **1. Introduction**
Git repositories today are identified by their URLs. This creates long‑term fragility in:
- dependency management - import paths - provenance tracking - fork lineage - security metadata - multi‑repo systems - organizational migrations
This RFC proposes a minimal, optional, backward‑compatible mechanism for assigning **stable identities** to Git repositories.
---
## **2. Problem Statement**
Git currently lacks:
- a persistent repository identity - a way to track renames - a way to track hosting moves - a way to track mirrors - a way to track forks - a way to track upstream provenance - a way to reference repositories independent of URLs
As a result:
- Go import paths break - dependency manifests rot - security advisories become invalid - forks lose their origin - mirrors cannot be recognized - tools cannot detect duplicates - organizations cannot reorganize safely
Git’s URL‑based identity model is insufficient for modern software engineering.
---
## **3. Proposed Feature: `.git/identity`**
Introduce a file:
``` .git/identity ```
Containing:
``` uuid = "<128-bit UUID>" ```
### **Properties**
- generated once at `git init` - immutable - portable - stored inside the repository - independent of hosting - independent of remotes - independent of URLs - independent of usernames
### **Benefits**
- stable identity across renames - stable identity across mirrors - stable identity across forks - stable identity across hosting providers - stable identity across organizational changes
---
## **4. Use Cases**
### **4.1. Import Path Stability**
Tools and languages can reference:
``` uuid:d8f1-9c2e-44b1-8f3a-abc123 ```
instead of:
``` github.com/user/project ```
Renames no longer break imports.
---
### **4.2. Dependency Manifest Stability**
Manifests can store:
``` yaml = "uuid:d8f1-9c2e-44b1-8f3a-abc123" ```
instead of URLs.
This prevents dependency rot.
---
### **4.3. Provenance Tracking**
Forks can store:
``` origin_uuid = "d8f1-9c2e-44b1-8f3a-abc123" ```
Git can detect:
- upstream - divergence - last sync - fork lineage
---
### **4.4. Security Metadata Stability**
Security advisories can reference UUIDs instead of URLs.
This prevents advisories from breaking when repos move.
---
## **5. Backward Compatibility**
- optional - ignored by older Git versions - does not affect existing workflows - does not change commit formats - does not change remotes - does not change URLs - does not break anything
---
## **6. Conclusion**
A stable repository identity is a minimal, optional enhancement that solves long‑standing structural issues in Git’s architecture. It enables robust dependency management, provenance tracking, security metadata, and multi‑repo tooling.
---
# ⭐ **333. IMPLEMENTATION IDEAS / DETAILS**
This section describes how hosting providers (GitHub, GitLab, Gitea, Bitbucket, self‑hosted servers) could implement and expose stable repository identities using the proposed `.git/identity` file.
---
## **3.1. Repository UUID Storage**
When a repository is pushed, the hosting provider reads:
``` .git/identity uuid = "<128-bit UUID>" ```
The platform stores this UUID in its internal metadata database.
If the file does not exist, the platform may:
- generate a UUID on first push, or - leave the field empty (backward compatibility)
---
## **3.2. URL Structure and Access**
### **Human‑friendly URLs remain unchanged**
``` https://github.com/SkybuckFlying/yaml https://gitlab.com/sky/yaml ```
### **Optional UUID‑based URLs**
``` https://github.com/uuid/d8f1-9c2e-44b1-8f3a-abc123 https://gitlab.com/uuid/d8f1-9c2e-44b1-8f3a-abc123 ```
These URLs:
- never change - always resolve to the current location - survive renames, moves, and hosting migrations
---
## **3.3. Redirect Behavior**
If a repository is renamed:
``` /yaml → /yaml2 ```
UUID URL still works.
If moved to another user or organization:
``` /SkybuckFlying/yaml → /sky-org/yaml ```
UUID URL still works.
If moved to another hosting provider:
``` github → gitlab ```
UUID URL still works.
---
## **3.4. Fork and Mirror Detection**
With UUIDs, platforms can detect:
- mirrors (same UUID, same commit graph) - forks (different UUID, but `.gitorigin` references parent UUID) - duplicates (same UUID, different URLs)
This enables:
- accurate fork lineage - upstream tracking - divergence analysis - provenance reconstruction
---
## **3.5. Cloning by UUID**
Git could support:
``` git clone uuid:d8f1-9c2e-44b1-8f3a-abc123 ```
Git resolves the UUID by:
- checking `.gitimports` - checking local registry - querying hosting providers - falling back to known mirrors
---
## **3.6. Dependency Resolution Using UUIDs**
Manifests can reference UUIDs:
``` yaml = "uuid:d8f1-9c2e-44b1-8f3a-abc123" ```
Tools resolve the UUID to a URL using:
- `.gitimports` - hosting provider lookup - local cache
This prevents dependency rot.
---
## **3.7. Security Metadata Integration**
Security advisories can reference UUIDs:
``` uuid = "d8f1-9c2e-44b1-8f3a-abc123" cve = ["CVE-2022-28948"] ```
Platforms can warn users when:
- cloning vulnerable repos - checking out vulnerable commits
---
## **3.8. Backward Compatibility**
- Repositories without `.git/identity` continue to work - Tools ignoring UUIDs continue to work - URLs remain unchanged - No protocol changes - No breaking changes
---
# ⭐ **444. EXAMPLES — Why Stable Identity Matters**
## **Example 1: Go Import Path Breakage**
Today:
``` import "github.com/user1/yaml" ```
User renames account → imports break.
With UUIDs:
``` import "sky/yaml" ```
Mapped via:
``` sky/yaml = "uuid:d8f1-9c2e-44b1-8f3a-abc123" ```
Repo moves → nothing breaks.
---
## **Example 2: Fork Provenance Loss**
Today Git does not know:
- what repo a fork came from - when it was last synced - how far it diverged
With UUIDs:
``` .gitorigin origin_uuid = "d8f1-9c2e-44b1-8f3a-abc123" last_synced = "a3f1234" ```
Git can track upstream properly.
---
## **Example 3: Security Advisory Stability**
Today advisories reference URLs:
``` CVE-2022-28948 affects github.com/user/yaml ```
Repo moves → advisory becomes ambiguous.
With UUIDs:
``` uuid = "d8f1-9c2e-44b1-8f3a-abc123" cve = ["CVE-2022-28948"] ```
Advisory remains valid forever.
---
## **Example 4: Organizational Migration**
Company moves from GitHub → GitLab.
Today:
- all URLs change - manifests break - imports break - tooling breaks
With UUIDs:
- identity stays the same - manifests stay valid - imports stay valid - tooling stays valid
Only the URL mapping changes.
---
## **Example 5: Mirror Detection**
Today Git cannot tell:
- if two URLs point to the same repo - if a repo is a mirror - if a repo is a duplicate
With UUIDs:
``` uuid = "d8f1-9c2e-44b1-8f3a-abc123" ```
Git instantly knows:
> “These two repos are the same project.”
---
Bye for now, Skybuck Flying / Harald Houppermans ! ;) =D XD