hub - make git easier with GitHub
--noop] COMMAND [OPTIONS]
hub alias [
hub help hub-COMMAND
Hub is a tool that wraps git in order to extend it with extra functionality that makes it better when working with GitHub.
Available commands are split into two groups: those that are already present in git but that are extended through hub, and custom ones that hub provides.
Replicate commits from a GitHub pull request locally.
Download a patch from GitHub and apply it locally.
Check out the head of a pull request as a local branch.
Cherry-pick a commit from a fork on GitHub.
Clone a repository from GitHub.
Add missing remotes prior to performing git fetch.
Initialize a git repository and create it on GitHub.
Merge a pull request with a message like the GitHub Merge Button.
Push a git branch to each of the listed remotes.
Add a git remote for a GitHub repository.
Add a git submodule for a GitHub repository.
Show shell instructions for wrapping git.
Open a GitHub repository in a web browser.
Display GitHub Status information for a commit.
Open a GitHub compare page in a web browser.
Create a new repository on GitHub and add a git remote for it.
Delete a repository on Github.
Fork the current project on GitHub and add a git remote for it.
Create a GitHub pull request.
List and checkout GitHub pull requests.
List and create GitHub issues.
List and create GitHub releases.
Fetch from upstream and update local branches.
Hub will prompt for GitHub username & password the first time it needs to access
the API and exchange it for an OAuth token, which it saves in
To avoid being prompted, use
Alternatively, you may provide
GITHUB_TOKEN, an access token with
repo permissions. This will not be written to
If you prefer the HTTPS protocol for git operations, you can configure hub to
generate all URLs with
https: instead of
$ git config --global hub.protocol https
This will affect
remote add and other hub commands that
expand shorthand references to GitHub repo URLs.
By default, hub will only work with repositories that have remotes which
github.com. GitHub Enterprise hosts need to be whitelisted to
configure hub to treat such remotes same as github.com:
$ git config --global --add hub.host MY.GIT.ORG
The default host for commands like
clone is still
this can be affected with the
GITHUB_HOST environment variable:
$ GITHUB_HOST=my.git.org git clone myproject
Enable verbose output from hub commands.
The file path where hub configuration is read from and stored. If
XDG_CONFIG_HOME is present, the default is
$HOME/.config/hub. The configuration file is also
searched for in
XDG_CONFIG_DIRS per XDG Base Directory Specification.
Use one of "https|ssh|git" as preferred protocol for git clone/push.
OAuth token to use for GitHub API requests.
git(1), git-clone(1), git-remote(1), git-init(1), https://github.com/github/hub