newgit Docs GitHub
Contents

Commit your .env.

The only reason you can't is that Git has one history and one set of readers. newgit gives every file an owner with its own audience, so secrets live in the repo, and every branch comes up with everything it needs to run.

curl -fsSL https://newgit.dev/install.sh | sh
brew tap spheroman/newgit
brew install newgit

Then tell your agent:

Set up newgit in this project.

Time to set up a new worktree for T3 Code

macOSgit worktree + pnpm install
38.6s
macOSevery optimization Theo could find
29.7s
Linuxgit worktree + pnpm install
3.8s
macOSnewgit spawn
2.95s

Worktree times from Theo Browne's benchmark: pnpm install in a new T3 Code worktree, median per machine, on a $12,000 Mac and a $700 PC. newgit spawn is the median of 9 runs on an M5 Pro, after the first install.

git worktree
newgit spawn
Copy .env over by hand
It's tracked, readable only by you
Run pnpm install again
Cloned from the last identical install
Port 3000 is already taken
Every branch gets its own ports
Both branches write to one database
Each branch binds its own

Trackers

A tracker owns a set of paths and has its own history and audience. Your code is one, your .env is another. Together they make one ordinary Git repo, and every commit splits back to the tracker that owns it.

Your agent still sees Git

No new commands to learn. git commit, git push, and gh pr create work the way the agent expects.