LinuxCommandLibrary

hub-branch

same as git branch but extended with GitHub integration

TLDR

List local and remote branches

$ hub branch -a
copy
Create a new branch
$ hub branch [branch-name]
copy
Delete a branch
$ hub branch -d [branch-name]
copy
Force delete branch
$ hub branch -D [branch-name]
copy
Rename current branch
$ hub branch -m [new-name]
copy

SYNOPSIS

hub branch [options] [branch]

DESCRIPTION

hub branch is the same as git branch but extended with GitHub integration. Hub is a command-line wrapper for git that provides extra features for working with GitHub. Note: hub is now deprecated in favor of the official GitHub CLI (gh).

PARAMETERS

-a, --all

List both local and remote branches.
-r, --remotes
List remote branches only.
-d
Delete branch (only if merged).
-D
Force delete branch.
-m
Rename branch.
-v, --verbose
Show more info.

CAVEATS

Hub is deprecated. Consider using the GitHub CLI (gh) instead.

SEE ALSO

hub(1), git-branch(1), gh(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community