STG-BRANCH(1) | StGit Manual | STG-BRANCH(1) |
NAME¶
stg-branch - Branch operations: switch, list, create, rename, delete, ...
SYNOPSIS¶
stg branch stg branch [--merge] <branch> stg branch {--list,-l} stg branch {--create,-c} <new-branch> [committish] stg branch {--clone,-C} [new-branch] stg branch {--rename,-r} [old-name] <new-name> stg branch {--protect,-p} [branch] stg branch {--unprotect,-u} [branch] stg branch {--delete,-D} [--force] [branch] stg branch --cleanup [--force] [branch] stg branch {--describe,-d} <description> [branch]
DESCRIPTION¶
Create, clone, switch, rename, or delete StGit-enabled branches.
With no arguments, the current branch is printed to stdout.
With a single argument, switch to the named branch.
StGit supports specifying a branch using the @{-<n>} syntax supported by git, including - as a synonym for @{-1}. Thus stg branch - may be used to switch to the last checked-out HEAD. Note that @{-<n>} refers to the <n>th last HEAD, which is not necessarily a local branch. Using an @{-<n>} value that refers to anything but a local branch will result in an error.
COMMANDS¶
--list
--create
StGit attempts to detect the branch from which the new branch forked, as well as the remote repository of that parent branch such that stg-pull(1) will pull from the correct remote branch. A warning will be printed if the parent branch cannot be determined.
--clone
The description of the new branch will indicate it is a clone of the current branch. The parent information of the new branch is copied from the current branch.
--rename
--protect
--unprotect
--delete
The branch will not be deleted if there are any patches remaining unless the --force option is provided.
If the current branch is selected for deletion, its parent branch must be configured and the worktree must be clean. The parent branch will be checked-out after the current branch is deleted.
A protected branch may not be deleted; it must be unprotected first.
--cleanup
A protected branch will not be cleaned up; it must be unprotected first.
A cleaned up branch may be reinitialized using stg-init(1).
--describe
OPTIONS¶
--merge
--DELETE OPTIONS¶
--force
--CLEANUP OPTIONS¶
--force
STGIT¶
Part of the StGit suite - see stg(1)
09/20/2024 | StGit 2.4.12 |