Branches

Friday tracks two branches per session: your feature branch (the one you're checked out on, where threads merge their commits) and your base branch (the merge target when Friday opens pull requests, and the reference point for the agent's view of "what's on this branch").

You switch feature branches the normal way (git checkout, terminal or Bash mode); Friday picks up the change. You change the base branch with /base-branch.

Feature branch and base branch: why two?

In a normal day-to-day workflow they collapse to "feature branch on top of main":

  • Feature branch: add-healthz-endpoint
  • Base branch: main

But the two roles are distinct:

Feature branchBase branch
What it isThe branch you're checked out on right nowThe reference point for in-progress work and the PR target
Set howgit checkout (manual or via Friday's bash)/base-branch, or per-project default
When it changesWhenever you switch branchesRarely, usually once per session or per project
Used byThreads merge into thisGithubPrCreate passes --base <base> to gh pr create; the <branch_context> system-prompt block runs git log <base>..<feature> to tell the agent what's on the branch

The base branch does not affect the /diff modal. /diff shows uncommitted changes (staged plus unstaged); it doesn't compare against any branch.

The two diverge when:

  • Stacked PRs: PR #2 in a stack should base off PR #1's branch, not main. Set /base-branch to PR #1's branch before working on PR #2.
  • Long-lived release branches: feature merges into release/v2.0 instead of main.

For most workflows you set the base branch once per project (saved as default) and never think about it again.

/base-branch

The /base-branch command changes which branch Friday uses as the reference point for the current session: the PR target, and the <base>..<feature> range that defines what the agent considers "in-progress work" on this branch.

When invoked, Friday displays a fuzzy-searchable list of local branches, lets you select one, and asks if you'd like to save it as the default for this project. If saved, Friday will use this base branch the next time you start a session in this project.

Quick start

  1. Type /base-branch in the Friday prompt.
  2. Select the desired base branch from the list.
  3. Optionally save it as the default base branch for this project.
  4. Friday updates the session context with the new base branch.

Switching feature branches

There's no slash command for this. From the terminal: git checkout -b new-feature, then re-launch Friday (or run ! git checkout -b new-feature from Bash mode in an existing session). Friday's branch indicator picks up the change after the next agent turn.

If you want a one-step "create branch and start working" flow, use autostart: friday --prompt "implement X" auto-generates a feature branch name from the prompt and runs the work end-to-end. See Autostart mode.

Examples

Changing base branch for stacked work

You're working on a feature branch that should be compared against develop instead of main:

You: /base-branch
Friday: Select base branch (reference point for in-progress work and PR target):
  > develop
    main
    staging
You: [select develop]
Friday: Would you like to save this as the default base branch?
You: yes
Friday: Base branch mapping saved
        Base branch changed to 'develop' for this session

Future Friday sessions in this project will default to develop as the base branch.

Related