Docs / Connect / Git history

Index Git commit history in ModelBrain

A commit message is the one place a developer wrote down why, so ModelBrain indexes the why and leaves the diff alone. The git-history source runs git log on a repository and indexes each commit as one memory in a partition called Git history. Ask your assistant why something changed and it can answer from the commit that changed it. Available from ModelBrain 0.6.6.

Before you start
Add it
  1. Open the ModelBrain menu, choose Vaults, then Add Source, then Git history….
  2. Choose the repository folder.
  3. ModelBrain indexes it in the background.

From a terminal, connector_sync register <id> <path> --type git-history does the same. For example: connector_sync register my-repo ~/code/my-repo --type git-history.

What it reads
What it skips
Limits and safety

A commit's text never changes for a given hash. If history is rewritten, the old commits disappear from memory and the new ones are added. A member over 32 MiB is refused. If git log fails, the source is recorded as failed and nothing already indexed is removed.

This source is hidden from relay callers. Anything that reaches ModelBrain through the hosted relay, which is how ChatGPT and Grok connect, cannot see what this source imported unless you add its partition (and the partition of any other source of the same kind) to that connection's allowlist yourself. Author emails sit in every memory, so keep that in mind before you point the source at a repository that is not yours.

Check that it works
  1. Ask your assistant to run ModelBrain diagnostics. The source reports its kind, members, members_failed and last_container_bytes.
  2. Ask a local assistant why a particular file or feature changed.
If something does not work

The source says git is not on PATH

Install Git, or start ModelBrain from an environment where git runs. Then trigger another pass.

Old commits are missing

Only the latest 5,000 are indexed by default. Raise MODELBRAIN_GIT_HISTORY_LIMIT if you want more.

Questions

How do I add Git history to ModelBrain?

Open the ModelBrain menu, choose Vaults, then Add Source, then Git history, and pick the repository folder. Available from ModelBrain 0.6.6.

Does ModelBrain index code diffs?

No. Diffs are never read. Each memory holds the commit message, the author, the date and the names of changed files.

How many commits does it index?

The latest 5,000 by default. The MODELBRAIN_GIT_HISTORY_LIMIT setting changes that.

Does it need Git installed?

Yes. ModelBrain runs git log as a child process. If git is not on PATH, the source reports a failure and nothing is indexed.

Other sources

Each new source kind has its own page.

Claude Code memory → · ChatGPT export → · Mail → · Calendar and contacts →
Connect an assistant

Sources feed the same memory these assistants read.

Claude Desktop → · Claude Code → · Cursor →