DualGit is a Git orchestrator that keeps two histories for the same project:
publichistory (main-> public remote)privatesuperset history (private-main-> private remote)
dualgit initdualgit context public|privatedualgit statusdualgit push [--all-contexts] [--dry-run]dualgit publishdualgit hooks install|checkdualgit shell-init zsh|bash
- Build:
go build -o dualgit ./cmd/dualgit- Install shell integration:
eval "$(./dualgit shell-init zsh)"
# or bash
# eval "$(./dualgit shell-init bash)"- Initialize in a repo:
./dualgit init.gitignore: excluded from both public and private histories..publicignore: paths allowed only in private context.- In
publiccontext:- pre-commit hook blocks commits touching
.publicignorepaths. - pre-push hook blocks raw
git push(must usedualgit push).
- pre-commit hook blocks commits touching
dualgit pushvalidates outgoing public commits against.publicignore.
- Public commit replication to private is implemented through shell wrapper flow:
git commit->dualgit _post_commit_sync.
- If you bypass
shell-init, commit replication is not automatic; protections still apply at hook/push level.