gwz branch¶
Manage local Git branches across selected workspace members.
With no operation flag, gwz branch lists local branches for the selected
members. Branch operations apply to workspace members only; the workspace root
repository is not included.
Options¶
| Option | Meaning |
|---|---|
--list |
List local branches across selected members. This is the default. |
--create <name> |
Create a local branch across selected members. |
--from <ref> |
Start point for --create. Defaults to HEAD. |
--switch |
Switch selected members to the branch after --create. |
--delete <name> |
Delete a local branch across selected members. |
--merge <source> |
Merge a source ref into each selected member's current attached branch. |
Only one of --list, --create, --delete, or --merge may be supplied.
--from and --switch require --create.
Examples¶
List branches:
Create a branch from each selected member's HEAD:
Create and switch to a branch:
Create from a named start ref:
Delete a non-current branch:
Merge a source ref into each selected member's current branch:
Notes¶
- Create rejects before mutation if any selected member lacks the start ref or already has the branch at a different commit.
- Create with
--switchrequires clean selected member worktrees and rewrites the lock from observed post-switch state. - Delete refuses to delete the current branch. Deleting a non-current branch does not require a clean worktree.
- Merge requires each selected member to be materialized, clean, on a current attached branch, and free of in-progress merge/rebase state before mutation.
- Merge conflicts are reported as
conflictedwith per-member conflict paths. The native Git merge state is left in place for resolution, and successful earlier member merges are not rolled back. - Branch mutations acquire the workspace-wide mutator lock shared with
gwz stash.