Branches and worktrees
Every session shows its machine, folder and branch at the top left. The branch menu lists your branches, and also has New Branch…. Switching branch changes the folder itself, so it affects every session working in that folder. For that reason the branch entries and New Branch… are unavailable while any session in the folder, this one included, is working. New Session in Worktree… stays available.
A worktree gives a session its own folder and branch, while history and remote stay shared with your main repository. Use one whenever two sessions work in the same repo.
To start a session in a worktree:
- On the new session screen, open the branch menu and choose New Worktree…. In an existing session, use the location menu and choose New Session in Worktree….
- Enter a Branch name, or leave it empty to name it from your first message.
- Choose what it starts From: the default branch, the current branch or another branch.
- Optionally open Project setup and set a Setup command such as
pnpm install, which runs before your first message, and Symlinked folders such asnode_modules. - Click Create, then send your first message. The worktree is created when you send it.
Files that git ignores, such as .env, aren't copied. Add a .worktreeinclude file to the repo to copy chosen ignored files. Branch names starting with bey/ are reserved for workflows.
Worktrees live under ~/.beydock/worktrees on the machine that runs the session. You can change the location for each device in the Worktree location box on its device page in Home. Set a branch prefix and automatic archiving under Settings › General › Worktrees.
Cleaning up
When you archive or delete a worktree session, a clean worktree is removed silently. If it has uncommitted changes or unpushed commits, a card lists them and asks Keep Worktree or Remove Worktree. If a worktree folder is missing, the session offers Restore Worktree. The device page lists all worktrees and has Remove Clean Worktrees.
Ship your work
A band above the message box shows the repo, the changes against the base branch, and the next step:
- Create PR opens a pull request on GitHub with
gh. When everything is committed, BeyDock pushes the branch and opens a draft PR itself. Use the menu for Create Ready PR. When there are uncommitted changes, BeyDock asks the agent to commit and open the PR. - Commit and Push asks the agent to commit and push.
- View PR #N (or Draft PR #N) opens an existing PR.
- Merge into the base branch merges locally with
--no-ff. It is offered for a session's own worktree once everything is committed. If the merge conflicts, BeyDock undoes it so your target branch stays clean, and offers Ask Agent to Resolve.
Fork and rewind
Hover a message or a reply to see its actions:
- Rewind appears on your last message. It removes that message and the reply, and puts your message back in the box so you can edit it.
/rewinddoes the same. - Fork from here starts a new session from that point and leaves the original as it is.
/forkforks from the last reply. - Fork into new worktree does the same in its own worktree and carries your uncommitted changes over.
Providers differ:
- Claude can rewind both the conversation and the files. The confirmation offers Rewind Conversation and Files or Rewind Conversation Only.
- Codex can fork and rewind, but doesn't restore files. Files it changed stay as they are.
- Antigravity and OpenCode can't cut a conversation, so Rewind and Fork are unavailable and the commands say why.
On an SSH host, git, worktrees and files are on that host.