Codumentor logo Codumentor Enterprise

Branch Switching

Is it enabled for you? Start a new conversation and look for a Repositories & Branches section on the welcome screen. If it is not there, your administrator has not enabled branch switching.

Codumentor can run a conversation against a different git (or SVN) branch for each repository, checking that branch out inside the conversation's own private workspace instead of your shared checkout.

Choosing a branch

On the welcome screen shown before you send your first message, each configured repository appears in a Repositories & Branches section with a branch dropdown next to it. Pick the branch you want checked out for that repository in this conversation; your choice is saved with the conversation as soon as you pick it, and applies for the life of that conversation.

The dropdown only lists branches that already exist in the repository (local and remote-tracking branches) — it has no way to create a new branch. If the branch you need doesn't exist yet, create it first (for example by pushing it), then refresh the list.

Isolation and safety

The actual git checkout only happens when workspace isolation is active for the conversation. Isolation gives the conversation a private overlay on top of a snapshot of the repository, and the checkout runs inside that overlay — your shared repository on disk, and every other conversation, are left untouched.

If workspace isolation isn't available, your branch choice is still remembered, but no checkout is performed.

Because each conversation's overlay starts fresh, there's no uncommitted work to stash when the branch is checked out: the workspace begins clean on the branch you picked, and only changes made during the conversation itself accumulate on top of it.

Multiple repositories

When more than one repository is configured, the Repositories & Branches section lists all of them and lets you pick a branch independently for each one — different repositories in the same conversation can be checked out to different branches.

Branch context in the header

Open Repositories & Branches from the branch icon in the conversation header, or from More when the action bar is compact. The panel displays each repository’s configured default branch or the conversation’s selected branch. The title and latest activity or outcome stay visible, and both headers keep the same height.

Switching branches during a conversation

When the conversation runs in an isolated overlay workspace, you can also switch branches from that panel after the conversation has started. Pick a new branch for one or more git repositories, then press Switch (or Cancel to discard your picks). The switch is checked out in the conversation's workspace straight away, a line in the conversation records it, and the agent is told at its next turn that earlier file contents and test results describe the old branch.

Before your first message the panel is read-only: choose branches on the welcome screen instead.

Switching is only offered while the conversation is idle:

Commits made on the branch you leave stay on it. If some of them have not been pushed yet, the panel warns you before you switch, and they come back when you switch back to that branch. Without workspace isolation (or when you do not own the conversation) the panel is read-only.

Search on non-default branches

Code search normally indexes each repository's default branch. When a conversation uses another branch, Codumentor builds a small additional index in the background covering just the files that branch changed, so search results reflect that branch too. Until that finishes — or if it fails — search falls back to the default branch's index. The conversation header does not display search-index warnings.