Skip to content
moshpit

Docs · Topic

Git worktrees

On hosts running herdr, New Agent Task spins up an isolated git worktree on a new branch and starts an agent inside it—keeping your main checkout clean so several agents can work on the same repository in parallel.

  1. On Home (under a herdr host card) or in the Workspaces sheet, tap New Agent Task.
  2. Under TASK, tap Repo and choose one of the git repositories Moshpit found in your open panes or under ~. To enter a path outside those, pick Other… and type the Repository path (for example /home/dev/project).
  3. Type a Branch name. Moshpit checks git’s branch-naming rules as you type (no spaces, .., or ~ ^ : ? * [ \).
  4. Tap Agent and pick which coding agent to launch (such as claude or codex).
  5. Optionally enter a Prompt under FIRST MESSAGE. Moshpit sends it to the agent as soon as it starts; leave it blank if you want to type at the prompt yourself.
  6. Tap Start.

herdr checks out the new branch under ~/.herdr/worktrees, opens a dedicated workspace pane for it, and hands you the live terminal.

When the branch is merged or no longer needed, use Remove Worktree from the workspace’s menu. That deletes only the branch checkout under ~/.herdr/worktrees and leaves your main repository untouched. If the worktree holds uncommitted or unmerged changes that exist nowhere else, Moshpit warns you before removing them.