Zum Inhalt springen

Using git as a memory layer for AI code assistants

Hey everyone,

I’ve been exploring an interesting pattern: using git as a queryable memory for AI coding assistants.

The problem: AI assistants like Claude have no memory between sessions and every debugging session means re-explaining your entire codebase burning lot of tokens.

My approach: Auto-commit every file save to a parallel local hidden git repository, then expose git operations to the AI via MCP.

Instead of feeding Claude my entire codebase, it now runs git commands directly on this hidden repo (which contains the full evolution of my codebase).

The interesting part is that AI already speaks git fluently. It knows exactly which commands to run for different scenarios.

Tradeoffs I’m seeing:

– Pros: Massive token reduction, AI can trace bug introduction, perfect undo history

– Cons: Disk usage (~12MB per 10k commits), another process running in background

Has anyone else tried giving AI assistants access to version control?

Thank you!
Alessandro

submitted by /u/Apart-Employment-592
[link] [comments]

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert