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 branch | Base branch | |
|---|---|---|
| What it is | The branch you're checked out on right now | The reference point for in-progress work and the PR target |
| Set how | git checkout (manual or via Friday's bash) | /base-branch, or per-project default |
| When it changes | Whenever you switch branches | Rarely, usually once per session or per project |
| Used by | Threads merge into this | GithubPrCreate 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-branchto PR #1's branch before working on PR #2. - Long-lived release branches: feature merges into
release/v2.0instead ofmain.
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
- Type
/base-branchin the Friday prompt. - Select the desired base branch from the list.
- Optionally save it as the default base branch for this project.
- 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
- Modes: branch behavior is GIT mode only.
- Build a feature and open a PR: the workflow that uses both branches.
- PR stack: the typical case for changing base branch.