Git versions code, not behavior
A prompt stored in git is version-controlled in the worst sense: you get the text delta, not the behavioral delta. When the prompt changes, git tells you which words moved. It does not tell you that version B dropped the citation rule, because that is a behavioral change, not a textual one.
What prompt history needs that git misses
- Semantic diff — what obligation changed, not which character.
- Regression check — did a guardrail present in A survive in B?
- Rollback with confidence — restore a known-good version and prove why it was good.
- Exportable audit — the version, the diff, the regression result, the timestamp.
Git can store the text. It cannot judge whether the agent's behavior regressed, which is the only thing the deployer's conformity story (Art. 9 / 12 / 15) actually cares about.
They are complementary, not rivals
Keep prompts in git for engineering hygiene, and run them through a prompt-versioning tool for behavioral governance. Git is the source of truth for the file; the versioning tool is the source of truth for what the agent does. One without the other leaves a gap: a repo that changed, but no record of whether the agent got safer or weaker.
What this comparison does not claim
Prompt versioning reduces obvious failure modes and makes behavior auditable. It is not a guarantee the agent is safe or compliant, and it is not a legal opinion. Conformity stays the deployer's responsibility across the full system.
Authoritative references
- EU AI Act (Reg. 2024/1689), Art. 9 / 12 / 15: https://eur-lex.europa.eu/eli/reg/2024/1689/oj
- AI Act explorer: https://artificialintelligenceact.eu/
- OWASP LLM Top 10 (2025): https://owasp.org/www-project-top-10-for-large-language-model-applications/