Codumentor logo Codumentor

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.

This feature may not be available in all setups. If you don't see a Repositories & Branches section on the welcome screen, branch switching may not be enabled by your administrator.

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.

The branch banner

Once a conversation has a repository checked out to a non-default branch, a compact banner appears in the conversation header naming the repository and branch, so you always know when you're not looking at the default branch.

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, and the branch banner shows a warning icon you can click for details.