GitPilot is a local-first Git collaboration assistant for teams. It helps prevent merge conflicts before they happen, tracks file ownership, blocks unsafe actions, and improves visibility into team activity.
GitPilot runs in two modes:
- Local only (no server required)
- Optional MongoDB sync for team collaboration
GitPilot CLI commands:
gitpilotgtp(alias)
GitPilot adds a lightweight coordination layer on top of Git. It is designed for fast, daily use in real repositories.
With GitPilot, teams can:
- Prevent merge conflicts early
- Track who is working on which files
- Block unsafe commits and pushes
- See recent file-level activity
- Lock files before editing to signal ownership
- Only the lock owner can unlock
- Reduce accidental overlap on critical files
GitPilot blocks staging when:
- Your branch is behind remote
- A changed file is locked by another user
- Records added and removed lines per file
- Shows recent collaboration history
- Maintains practical history limits for speed
The status view shows:
- Modified files
- Lock status per modified file
- Other active locks in the repository
The who view shows:
- Active locks
- Recent activity
- Pre-commit blocks commits when locked files are modified by non-owners
- Pre-push blocks push when branch is behind remote
- Pre-push also runs state sync
- Local-first by default
- Optional MongoDB sync
- Sync happens during command execution (no daemon)
- Sync runs automatically before commit and before push, and on relevant read and lock operations
Install globally:
npm install -g @rkokilan2002/git-pilotInitialize GitPilot in your repository:
gtp initThis will:
- verify you are in a Git repository
- set your user name (interactive)
- optionally configure MongoDB
- install Git hooks
gtp init --yesThis skips prompts and uses defaults where possible.
Lock a file:
gtp lock <file>Unlock a file:
gtp unlock <file>View team activity and locks:
gtp whoRepository status:
gtp statusSafe add (with lock and remote checks):
gtp add <path>Manual sync with MongoDB:
gtp syncDoctor (check GitPilot setup):
gtp doctorView current configuration:
gtp config listSet your user name:
gtp config set-user <name>Remove user configuration:
gtp config unset-userSet MongoDB for team sync:
gtp config set-mongo <uri>Remove MongoDB configuration:
gtp config unset-mongoReset all configuration:
gtp config resetFor team sync, set up MongoDB Atlas:
- Create a MongoDB cluster at MongoDB Atlas
- Create a database user and copy the connection URI
- Whitelist your IP in Network Access
- Share the URI securely (not in Git or public channels)
- Configure on each machine:
gtp config set-mongo <mongo-uri>After setup, locks and activity are shared across team members.
Install hooks in the repository:
gtp installRemove GitPilot hooks:
gtp uninstall(Only removes GitPilot-managed hooks, preserves others)
Local state is stored in:
.git/gitpilot/state.json
User configuration is stored in:
~/.gitpilot/config.json
In critical situations, bypass hooks temporarily:
git commit --no-verify
git push --no-verifyWarning: Using --no-verify may cause merge conflicts or overwrite another developer's work.
Status view:
[OK] GitPilot Repository Status
Modified Files
src/auth.ts -> locked by kokilan
src/utils.ts -> unlocked
Other Active Locks
src/config.ts -> alex
Who view:
[OK] GitPilot Status
Active Locks
src/auth.ts -> kokilan
Recent Activity
src/auth.ts -> kokilan (+20 / -5)
src/utils.ts -> alex (+10 / -2)
- Local-first
- No background processes
- Fast CLI execution
- Fail-safe offline behavior
- Minimal friction for daily Git workflows
GitPilot maintains state separately from Git. Each repository is identified by its Git remote URL, ensuring that all team members working on the same repository share the same locks and activity data, regardless of their local folder names.
When MongoDB is configured, state is synced automatically during relevant operations. Without MongoDB, GitPilot works entirely locally within .git/gitpilot/.
Git is excellent at version control, but it does not coordinate active file ownership before conflicts happen. GitPilot adds that coordination layer so teams can avoid overwriting each other and reduce review and merge friction.
- Cloud version
- VS Code extension
- Web dashboard
- Conflict prediction
MIT