Forks a new branch from the source branch’s current head. The new branch sees all data visible on the source at fork time; later writes on either branch stay isolated. The returned branch summary records the parent name, fork version, and generation.
On the CLI, all three fork commands share the single verb strata branch fork <SOURCE> <BRANCH>: with no flags it runs this command, while --version routes to branch.fork_at_version and --timestamp routes to branch.fork_at_timestamp (both wire-surface commands).
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Fork a branch from another branch’s head.
CLI
$ strata branch fork default experiment
$ strata branch list
Wire
{"branch":"experiment","source":"default","type":"branch_fork_current"}
{"type":"branch_list"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
source | string | yes | Source branch name. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<BranchItem>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.branch_nameinvalid_argument.engine.branch_name_reservedalready_exists.engine.branch
Invocation
- CLI:
strata branch fork - Wire type:
branch_fork_current