Worktrees and the terminal
Git worktrees are the cleanest way to work on several things at once — or to let several AI coding agents each work in their own folder. Fox Git treats worktrees as first-class: the Worktrees panel (⌘6) shows the state of every worktree and lets you clean them up safely.
Create a worktree
Click + in the Worktrees panel, or use “Check out in new worktree…” on a branch, “New worktree from this commit…” on a commit, or the command palette. You can start from a new branch, an existing branch, or a commit (detached):
- The folder defaults to
<repo>-<branch>next to the main worktree and avoids name clashes automatically; - Branches already checked out elsewhere cannot be picked, and clashing new branch names are flagged right away;
- You can choose to open the worktree right after it is created.
Setup commands
In repository settings you can configure commands to run after a worktree is created, such as pnpm i or copying .env. They run in the new worktree’s built-in terminal. If a worktree folder was moved by hand, “Repair worktree” (git worktree repair) reconnects it.
Grouped by state
The Worktrees panel sorts worktrees into four groups:
| Group | Meaning |
|---|---|
| In progress | Has uncommitted changes or recent activity |
| Idle | No commits or checkouts for a long time |
| Ready to clean | The branch is merged into the main branch (regular, rebase, and squash merges are all detected) |
| Broken | The folder no longer exists |
Each card shows the branch, uncommitted changes, ahead / behind, merge state, and recent activity; disk usage is computed on demand. The context menu lets you check the merge state (and which other branches contain it), compute disk usage, clean dependencies and build output (git clean -X -d, keeping .env), lock, and remove.
Bulk cleanup
Select several worktrees to remove them at once; the Ready to clean group has Select all. You can delete merged branches at the same time. For worktrees with changes or untracked files, Fox Git explains what would be lost and requires a forced removal. The main worktree and the current worktree cannot be removed.
Built-in terminal
The Terminal button in the title bar or Ctrl+` opens the bottom terminal, starting at the root of the current repository or worktree:
- Multiple tabs grouped by repository; shells keep running when you collapse the panel or switch tabs;
- Find (
⌘F), clear (⌘K), and links open in your system browser; - After you run a command, Fox Git refreshes the repository state automatically.
Open from the command line
Install the shell command from Settings once, then run foxgit . in any folder to open the repository in Fox Git.