Workflows
Isolated changes with worktrees
Use git worktrees to run Claude on a separate branch without affecting your main workspace.
Goal
Let Claude work on a task in parallel without touching your active working tree.
Outcome: A clean branch with Claude-generated changes ready to review and merge.
SafetyProductivity
IntermediateSteps
1
Create a new worktree on a new branch
Spin up an isolated copy of the repo on a fresh branch.
git worktree add ../my-feature-worktree -b feature/my-task2
Open Claude in that worktree
Start a session in the isolated directory.
cd ../my-feature-worktree && claude "implement the user dashboard feature"3
Let Claude work
Claude modifies files in the worktree without affecting your main branch.
- ·You can keep working in your main directory while this runs.
4
Review the diff
Check what Claude produced.
git diff main...feature/my-task5
Merge or discard
Merge the branch if happy, or remove the worktree to discard.
git worktree remove ../my-feature-worktreeCautions
- ⚠Review all changes before merging — Claude works autonomously in worktrees.