Documentation ¶
Overview ¶
Package branch git-branch - List, create, or delete branches.
SYNOPSIS ¶
Reference: https://git-scm.com/docs/git-branch
git branch [--color[=<when>] | --no-color] [--show-current] [-v [--abbrev=<n> | --no-abbrev]] [--column[=<options>] | --no-column] [--sort=<key>] [--merged [<commit>]] [--no-merged [<commit>]] [--contains [<commit>]] [--no-contains [<commit>]] [--points-at <object>] [--format=<format>] [(-r | --remotes) | (-a | --all)] [--list] [<pattern>...] git branch [--track[=(direct|inherit)] | --no-track] [-f] [--recurse-submodules] <branchname> [<start-point>] git branch (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>] git branch --unset-upstream [<branchname>] git branch (-m | -M) [<oldbranch>] <newbranch> git branch (-c | -C) [<oldbranch>] <newbranch> git branch (-d | -D) [-r] <branchname>… git branch --edit-description [<branchname>]
Index ¶
- func Abbrev(n string) func(*types.Cmd)
- func All(g *types.Cmd)
- func BranchName(name string) func(*types.Cmd)
- func Color(when string) func(*types.Cmd)
- func Column(style string) func(*types.Cmd)
- func Contains(commit string) func(*types.Cmd)
- func CreateReflog(g *types.Cmd)
- func Delete(g *types.Cmd)
- func DeleteForce(g *types.Cmd)
- func EditDescription(g *types.Cmd)
- func Force(g *types.Cmd)
- func Format(format string) func(*types.Cmd)
- func IgnoreCase(g *types.Cmd)
- func List(g *types.Cmd)
- func Merged(commit string) func(*types.Cmd)
- func Move(g *types.Cmd)
- func MoveForce(g *types.Cmd)
- func NoContains(commit string) func(*types.Cmd)
- func NoMerged(commit string) func(*types.Cmd)
- func PointsAt(object string) func(*types.Cmd)
- func Quiet(g *types.Cmd)
- func Remotes(g *types.Cmd)
- func SetUpstream(g *types.Cmd)
- func SetUpstreamTo(upstream string) func(*types.Cmd)
- func ShowCurrent(g *types.Cmd)
- func Sort(key string) func(*types.Cmd)
- func Track(g *types.Cmd)
- func UnsetUpstream(g *types.Cmd)
- func Verbose(g *types.Cmd)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateReflog ¶
CreateReflog create the branch's reflog -l, --create-reflog
func EditDescription ¶
EditDescription edit the description for the branch --edit-description
func IgnoreCase ¶
IgnoreCase sorting and filtering are case insensitive -i, --ignore-case
func NoContains ¶
NoContains print only branches that don't contain the commit --no-contains <commit>
func SetUpstreamTo ¶
SetUpstreamTo change the upstream info -u, --set-upstream-to <upstream>
func ShowCurrent ¶ added in v2.5.0
ShowCurrent print the name of the current branch. In detached HEAD state, nothing is printed. --show-current
func UnsetUpstream ¶
UnsetUpstream change the upstream info -u, --set-upstream-to <upstream>
Types ¶
This section is empty.