Overview
Worktrees in Jean are isolated git branches, each with their own working directory. They let you work on multiple features simultaneously without constant branch switching and stashing. Key concepts:- Each worktree is a separate directory with its own branch
- Worktrees are named with random friendly names (e.g.,
fuzzy-tiger,happy-cloud) - Each worktree contains chat sessions tracking your AI conversations
- Worktrees can be linked to GitHub PRs and issues
Creating a New Worktree
Start Worktree Creation
With a project selected, press
Cmd+N (Mac) or Ctrl+N (Windows/Linux).Alternatively, click the ”+” button next to the project name in the sidebar.Choose Creation Method
You have several options:Empty Worktree: Creates a clean worktree from the default branchFrom Issue: Creates a worktree linked to a GitHub issue. Jean will:
- Generate a branch name from the issue title
- Create the worktree
- Start a chat session with the issue context loaded
Wait for Setup
Jean will:
- Pull the latest changes from the default branch (if auto-pull is enabled)
- Create the git worktree and branch
- Run the setup script from
jean.json(if present) - Create an initial chat session
Creating from GitHub Issues
This is the most powerful worktree creation method for issue-driven development.Select an Issue
Browse the list and click on the issue you want to work on. You’ll see:
- Issue title and number
- Description
- Comments
- Labels
Create Worktree
Click Investigate Issue. Jean will:
- Generate a branch name from the issue title (e.g.,
fix-login-bug-123) - Create the worktree
- Save the issue context to a file in
.github/issues/ - Start a chat session with a prompt to investigate the issue
- Store the issue number for later PR creation
Switching Between Worktrees
Click to Switch
Click any worktree in the sidebar to switch to it. Jean will:
- Save the current chat session
- Load the selected worktree
- Show the most recent chat session (or the canvas view if multiple sessions exist)
Keyboard Navigation
Use
Cmd+Alt+→ and Cmd+Alt+← to cycle through sessions within a worktree.There’s no built-in keyboard shortcut to switch worktrees, but you can use the Quick Menu (Cmd+.) and type the worktree name.Merging Worktrees
Once your work is complete, you can merge the worktree back into the base branch.Select Merge Option
Choose one of:
- Merge: Creates a merge commit (preserves full history)
- Squash: Combines all commits into one (cleaner history)
- Rebase: Replays commits on top of base branch (linear history)
Review Changes
Jean will show:
- Files changed
- Commit count
- Diff summary
Handling Merge Conflicts
When merging produces conflicts, Jean provides AI-assisted resolution.Detect Conflicts
When a merge fails due to conflicts, Jean will:
- Show which files have conflicts
- Display the conflict diff with
<<<<<<<,=======, and>>>>>>>markers
Open Resolve Conflicts
In the Magic Modal, select Resolve Conflicts. Jean will:
- Create a new chat session
- Load the conflict diff as context
- Send a prompt asking Claude to analyze and resolve each conflict
Review AI Suggestions
Claude will:
- Explain what’s conflicting in each file
- Recommend resolutions
- Provide commands to stage resolved files
Apply Resolutions
Claude can directly edit the conflicted files to remove markers and merge changes. After each file is resolved, run:
Cleaning Up Worktrees
You can archive or permanently delete worktrees when they’re no longer needed.Choose Removal Behavior
Depending on your Preferences → General → Session Removal Behavior setting:Archive (default): Worktree is hidden but not deleted. You can restore it later via
Cmd+Shift+T.Delete: Worktree is permanently removed:- Git worktree is deleted
- Branch is deleted locally and remotely (if pushed)
- All chat sessions are deleted
- Teardown script runs (if configured)
Advanced: Auto-Pull Base Branch
When enabled (Preferences → General), Jean automatically pulls the latest changes from the default branch before creating a new worktree. Why this matters:- Ensures new worktrees start from the latest code
- Reduces merge conflicts later
- Catches upstream changes early
- Adds a few seconds to worktree creation
- Requires network access
Advanced: Teardown Scripts
Just like setup scripts, you can define a teardown script injean.json that runs when a worktree is deleted:
- Stop development servers
- Clean up Docker containers
- Remove large build artifacts
- Free disk space
Common Pitfalls
Best Practices
Next Steps
- Managing Sessions - Organize chat conversations within worktrees
- Using Magic Commands - Create PRs, commits, and reviews
- GitHub Workflows - Integrate with GitHub issues, PRs, and CI