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
1
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.2
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
3
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
4
Start Working
Once ready, the worktree appears in the sidebar under your project. Click it to open the chat interface.
Creating from GitHub Issues
This is the most powerful worktree creation method for issue-driven development.1
Open Magic Modal
Press
Cmd+M to open the Magic Commands modal.2
Navigate to Issues Tab
Click the Issues tab to see all open issues from your repository.
3
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
4
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
5
Work on the Issue
The AI assistant will analyze the issue, explore the codebase, and propose solutions. You can iterate in the chat to refine the approach.
Switching Between Worktrees
1
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)
2
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.3
Restore Last Session
Enable Restore Last Session in Preferences → General. When you switch projects, Jean will automatically return to the last worktree and session you were viewing.
Merging Worktrees
Once your work is complete, you can merge the worktree back into the base branch.1
Open Magic Modal
With the worktree selected, press
Cmd+M.2
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)
3
Review Changes
Jean will show:
- Files changed
- Commit count
- Diff summary
4
Confirm Merge
Click Merge. Jean will:
- Switch to the base branch
- Perform the merge/squash/rebase
- Push changes to remote (if configured)
- Archive the worktree (if “Auto-archive on PR merged” is enabled)
Handling Merge Conflicts
When merging produces conflicts, Jean provides AI-assisted resolution.1
Detect Conflicts
When a merge fails due to conflicts, Jean will:
- Show which files have conflicts
- Display the conflict diff with
<<<<<<<,=======, and>>>>>>>markers
2
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
3
Review AI Suggestions
Claude will:
- Explain what’s conflicting in each file
- Recommend resolutions
- Provide commands to stage resolved files
4
Apply Resolutions
Claude can directly edit the conflicted files to remove markers and merge changes. After each file is resolved, run:
5
Complete the Merge
Once all conflicts are resolved and staged, run:The merge operation completes and your worktree is clean.
Cleaning Up Worktrees
You can archive or permanently delete worktrees when they’re no longer needed.1
Close the Worktree
Press
Cmd+W with the worktree selected, or right-click and select Close.2
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)
3
Restore Archived Worktrees
Press
Cmd+Shift+T to restore the most recently archived worktree.Or right-click the project → View Archived to see all archived worktrees and restore specific ones.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