Aider error
Aider: Aider only works with git repos with version number 1 or 2
Aider only works with git repos with version number 1 or 2.Status: WorkaroundLast verified 3 documented fixes3 sources
What it means
Your git repo uses an index format that GitPython, which aider uses, cannot read, usually index version 3 or later. Older versions crashed with an AssertionError traceback through index.entries (issue #211). Current versions catch this at startup and print this message, followed by "You may be able to convert your repo: git update-index --index-version=2".
Causes
- The git repo uses a newer index format which might not be supported by GitPython (maintainer, issue #211).
How to fix it
- Fix 1.
Convert the repo index to version 2.
Snippetgit update-index --index-version=2 - Fix 2.
The maintainer also pointed to the GitPython workaround.
Snippetgit update-index --no-skip-worktree - Fix 3.
Or run aider without git.
Terminalaider --no-git
More Aider errors
All 17 Aider errorsThe LLM did not conform to the edit format.Status: WorkaroundSearchReplaceNoExactMatch: This SEARCH block failed to exactly match lines in {path}Status: WorkaroundModel gpt-3.5-turbo has hit a token limit!Status: WorkaroundModel foobar: Unknown context window size and costs, using sane defaults.Status: By designModel azure/gpt-4-turbo: Missing these environment variables:Status: By designaider: The term 'aider' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.Status: Workaroundaider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible.Status: WorkaroundThe API provider is not able to authenticate you. Check your API key.Status: By design
Related reading
- Aider vs Claude Code in 2026: Git-First Open Source vs Subagent RuntimeAider vs Claude Code: git-first, model-agnostic Aider against the Claude Code runtime of subagents and hooks. Compare architecture, cost, governance and fit.
- Aider vs Claude Code: Open Source vs Commercial AI Coding CLIAider is open source and works with any model. Claude Code is Anthropic's commercial agent. Here is how they compare for TypeScript.
FAQ
What does "Aider only works with git repos with version number 1 or 2" mean in Aider?
Your git repo uses an index format that GitPython, which aider uses, cannot read, usually index version 3 or later. Older versions crashed with an AssertionError traceback through index.entries (issue #211). Current versions catch this at startup and print this message, followed by "You may be able to convert your repo: git update-index --index-version=2".
How do I fix "Aider only works with git repos with version number 1 or 2"?
There are 3 documented fixes. Start with the first: Convert the repo index to version 2.
Is this Aider error fixed?
Status: Workaround. No release removes the cause. The documented fixes work around it. Affected versions: All versions; graceful startup check since v0.54.8 ("Sanity check the git repo and exit gracefully on problems"). Issue #211 remains open.
Sources
Last verified against 3 sources: official docs, maintainer replies and release notes.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.