Linux command
hub-branch 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List local and remote branches
hub branch -a
Create a new branch
hub branch [branch-name]
Delete a branch
hub branch -d [branch-name]
Force delete branch
hub branch -D [branch-name]
Rename current branch
hub branch -m [new-name]
说明
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).
参数
- -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.
FAQ
What is the hub-branch command used for?
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).
How do I run a basic hub-branch example?
Run `hub branch -a` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --all do in hub-branch?
List both local and remote branches.