branch
delete
Delete an active branch and release its storage claims.
strata branch deletedb.branches.delete(name: 'str') -> 'Any'wire branch_delete
Deletes an active branch and reports the deleted branch summary, generation facts, and storage cleanup counts. The `default` branch refuses deletion with `invalid_argument.engine.branch_delete`. Deletion discards the branch's work - promote anything worth keeping onto another branch with `branch merge` before deleting, or keep working on the branch instead.
Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.
To see the complete help for this command, run:
strata branch delete --helphelp(db.branches.delete)
Example
Delete a branch.
strata branch create tempstrata branch delete tempstrata branch list
_ = db.branches.create("temp")_ = db.branches.delete("temp")sorted(b.name for b in db.branches.list())
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| branch | string | yes | Branch name. |
Returns
MutationAck<BranchDelete>
- dataobject
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.branch_name | never | not_started |
| invalid_argument.engine.branch_name_reserved | never | not_started |
| invalid_argument.engine.branch_delete | never | not_started |