Get started
Many coding agents, one copy of Git history. git-dedup is a Git wrapper whose clones, forks, and worktree submodules share one local object pool. Agents and editors can create a fresh checkout per task without storing the history again. In one typical setup of 117 checkouts, Git objects take 11.1 GB instead of an estimated 35.5 GB (69% less).
Install git-dedup with npm:
npm install -g git-dedup
Requires Node.js 22+ and Git on macOS or Linux.
Clone a repository
# Automatically create or reuse the object pool in ~/.git-dedup.
git-dedup clone https://github.com/you/project.git project
# Borrow from the pool for another checkout.
git-dedup clone https://github.com/you/project.git project-review
cd project-review
# Work with Git as usual.
git status
git diff
git log --oneline
Submodules and worktrees
git-dedup submodule update --init --recursive
git-dedup worktree add -b review ../review
Existing repositories
# Add the current repository to the store.
git-dedup store add .
# Preview every checkout below a directory before adopting them.
git-dedup store add ~/Coding --all --dry-run
git-dedup store add ~/Coding --all
# View the store and its health checks.
git-dedup store
git-dedup store list
The --all sweep follows each checkout's Git ignore rules. It skips .git metadata and symlinks. A directory outside a Git worktree has no repository ignore rules, so all of its directory names are eligible for discovery.
See the CLI reference for commands or agent setup for coding agents.