Stats
Links
Categories
npx claudepluginhub BaeSeokJae/gwts-ccCreate Git worktrees with automatic untracked file synchronization
Git worktree + untracked file sync for Claude Code
Git worktrees are great for parallel development, but untracked files (migrations, .env, scripts) don't come along. This plugin syncs them automatically.
/plugin marketplace add BaeSeokJae/gwts-cc
/plugin install gwts-cc@gwts-cc
/worktree create feat/my-feature # Create from main (default)
/worktree create feat/my-feature from dev # Create from dev branch
/worktree create feat/my-feature from current # Create from current branch
/worktree list # List worktrees
/worktree sync # Sync files to current worktree
/worktree clean <path> # Remove worktree
Create .gwts in your project root:
{
"includes": ["migrations/", ".env.example"],
"mode": "symlink",
"hooks": { "postCreate": "pnpm install" }
}
That's it. Personal overrides go in .claude/gwts/worktree.json.
| Option | Description | Default |
|---|---|---|
includes | Files/dirs to sync | [] |
excludes | Files/dirs to skip | [] |
mode | symlink or copy | symlink |
hooks.postCreate | Command after create | - |
defaultPath | Worktree location | ../worktrees |
baseBranch | Base for new branches | main |
| Mode | Behavior | Use for |
|---|---|---|
symlink | Links to original, changes sync instantly | migrations, shared configs |
copy | Independent copy, no sync | .env.local, credentials |
Control where new branches are created from:
/worktree create feat/new # From baseBranch (main)
/worktree create feat/new from dev # From dev
/worktree create feat/new from current # From current branch
Set default in .gwts:
{
"baseBranch": "develop"
}
{
"includes": [
"migrations/", // directory
".env.example", // file
"apps/*/db/" // glob
]
}
Node.js project:
{
"includes": ["migrations/", ".env.example"],
"hooks": { "postCreate": "npm install" }
}
Monorepo:
{
"includes": ["packages/*/migrations/", "apps/*/db/"],
"hooks": { "postCreate": "pnpm install" }
}
Personal config (.claude/gwts/worktree.json):
{
"includes": [".env.local"],
"mode": "copy"
}
MIT