Instant parallel git worktrees. One command, zero ceremony.
nwt # creates a new worktree in .worktrees/<name>nwt is a thin bash wrapper around git worktree that lets you spin up isolated working copies of the current repo in seconds — without leaving your editor's repo root or stashing changes.
- No-arg mode: auto-generates a
wip-Nbranch, then prompts for a name to use for both the branch and the worktree directory. - Named mode:
nwt -c feature/logincreates the branch and worktree immediately. - Bulk mode:
nwt -aornwt "feature/.*"creates worktrees for many branches at once. - Dry run:
nwt -npreviews without touching anything.
Worktrees land in .worktrees/<name> inside the repo by default (configurable via WORKTREE_DIR).
./install-nwt.shThis copies git-worktree-quick into place and adds an nwt() shell function to your ~/.zshrc (or ~/.bashrc).
Manual install:
echo 'nwt() { ~/Github/nwt/git-worktree-quick "$@"; }' >> ~/.zshrc
source ~/.zshrcVerify:
nwt -n # dry-run preview| Command | What it does |
|---|---|
nwt |
Prompt for a name, create matching branch + worktree |
nwt -n |
Dry-run preview |
nwt -c feature/login |
Create named branch + worktree immediately |
nwt -c fix/bug -f develop |
Branch from develop instead of HEAD |
nwt -a |
Worktrees for ALL remote branches |
nwt "feature/.*" |
Worktrees matching a regex |
nwt -h |
Full help |
cd ~/project
nwt # → .worktrees/login-redesign
cd .worktrees/login-redesign
code . # work in isolation
git push -u origin login-redesignRun nwt again from the main repo to start another parallel experiment — they don't interfere with each other.
git-worktree-quick— the scriptnwtrunsinstall-nwt.sh— installer (adds shell function)git-worktree-parallel— advanced multi-worktree manager (more knobs, same idea)WORKTREE_QUICK_README.md— long-form docs and examples
git≥ 2.5 (worktree support)- bash or zsh