Skip to content
2 min read

fj stack

Manage stacked branches / stacked PRs

fj stack [OPTIONS] <COMMAND>

Every command also accepts the global flags: --host, --debug, --no-pager, --json-fields.

fj stack new

Start a new stack

fj stack new [OPTIONS] <NAME>

Arguments

  • <NAME> — Human-readable stack name; the slug and branch names derive from it

Options

  • --base <BASE> — Base branch the stack targets. Defaults to the repo’s default branch (when reachable), else main
  • --from <TYPE> <ID> — Link the stack to an issue, e.g. --from issue 123
  • --no-branch — Create the stack metadata only; don’t create the first branch
  • --json — Emit JSON instead of a human summary
  • --force — Replace an existing stack file (never deletes git branches)

fj stack sync

Sync the stack with its base branch

fj stack sync [OPTIONS]

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --draft — Create new PRs as drafts
  • --ready — Mark the stack’s PRs ready for review
  • --json — Emit machine-readable operations/results as JSON
  • --no-annotate — Don’t write the stack-navigation block into each PR description
  • --dry-run — Print intended actions without pushing or writing to Forgejo

fj stack split

Split the current change into multiple stacked entries

fj stack split [OPTIONS]

Options

  • --dry-run — Print the planned actions and exit without mutating anything
  • --json — Emit the planned/created entries as JSON

fj stack review

Show the stack and its review state

fj stack review [OPTIONS]

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --open — Open each PR URL in your browser
  • --request <USER> — Request review from a Forgejo user/team on every PR in the stack
  • --json — Emit JSON instead of a table (honors the global --json-fields)

fj stack absorb

Absorb staged changes into the appropriate stack entries

fj stack absorb [OPTIONS]

Options

  • --dry-run — Print the attribution plan and exit without mutating anything
  • --json — Emit the attribution plan as JSON

fj stack ship

Ship (merge) the ready entries of the stack

fj stack ship [OPTIONS]

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --squash — Squash-merge each PR
  • --merge — Merge-commit each PR
  • --delete-branches — Delete each branch (remote + local) after its PR merges
  • --force — Ship even if a PR isn’t green/approved
  • --json — Emit machine-readable operations/results as JSON
  • --dry-run — Print the merge plan without merging or deleting anything
Contributors
  • Stephen Way