Series: Ccmanager (6/10)

Create, Switch, and Delete Worktrees: CCManager's Core Operations
The previous article explained Git Worktrees conceptually. This one is about doing — creating Worktrees from the CCManager interface, running Agents in them, and merging changes back when you're done.
Not complicated, but the flow matters. Get it wrong and cleanup becomes annoying.
Creating a New Worktree
From the CCManager main menu, select New Worktree. A dialog appears asking for two things:
- Branch name: The branch the new Worktree will check out, e.g.
feature/add-auth. If the branch doesn't exist, CCManager creates it automatically. - Directory path (optional): Where the Worktree directory should live. Leave this blank and CCManager generates a path automatically based on the branch name — typically a sibling directory next to the repo.
Confirm, and the Worktree is created. The corresponding AI Agent session opens automatically.
Auto-Generating Directory Paths
Filling in the directory path manually every time gets old fast. Enable auto path generation:
Global Configuration → Configure Worktree → Auto-generate directory path
When setting the pattern, use {branch} as a placeholder — CCManager substitutes the branch name and sanitizes it for filesystem safety (slashes and other special characters get replaced).
For example, with the pattern ../worktrees/{branch}, creating feature/add-auth automatically produces the path ../worktrees/feature-add-auth. Once this is set up, creating Worktrees is significantly faster.
Copying Claude Session Data
When creating a new Worktree, the dialog asks whether you want to copy the current Claude session data into it.
Choosing to copy: CCManager copies all session files under ~/.claude/projects/[original-path] to the path corresponding to the new Worktree. Claude in the new Worktree can continue from the existing conversation, without needing a fresh introduction to the project.
Choosing not to copy: Claude in the new Worktree starts fresh.
Which is better? It depends:
- Continuing work that builds on the same project context, or launching a new task in the same project — copy. Save yourself the time of re-establishing context.
- A completely unrelated new task, or when you don't want the Agent influenced by prior conversations — don't copy. Start clean.
The default behavior can be configured in Global Configuration → Configure Worktree → Copy Session Data.
Switching Between Sessions
The main menu shows all Worktrees with their status. Select one and press Enter to switch into it.
To return to the menu from a session, press Ctrl+E (or your custom shortcut).
Deleting a Worktree
When a task is done, clean up: find the Worktree in the main menu and select Delete Worktree. CCManager removes the Worktree directory and cleans up the corresponding Git Worktree record.
Before deleting, confirm:
- Are all changes committed or pushed?
- Is this branch still needed?
Restoring a deleted Worktree is a pain. Take a second before confirming.
Merging Back to Main
CCManager has a Merge Worktree option that merges the Worktree's branch into a target branch you specify (typically main or develop).
After merging, the Worktree can usually be deleted — the task is complete, and so is the Worktree's lifecycle.
Create, switch, delete — the full Worktree cycle.
Next, a different angle: CCManager supports more than just Claude Code. Beyond Claude Code: Which AI Assistants Does CCManager Support? covers how to bring in other tools.