hub
-- git + hub = github
hub
COMMAND OPTIONS
hub alias
[-s
] SHELL
git init -g
OPTIONS
git clone
[-p
] OPTIONS [USER/]REPOSITORY DIRECTORY
git remote add
[-p
] OPTIONS USER[/REPOSITORY]
git push
REMOTE-1,REMOTE-2,...,REMOTE-N REF
git fork
git browse
[-p
] [USER/]REPOSITORY
git submodule add
[-p
] OPTIONS [USER/]REPOSITORY DIRECTORY
hub
enhances various git
commands with GitHub remote expansion. The
alias command displays information on configuring your environment:
hub alias
[-s
] SHELL:bash
, sh
, zsh
,
csh
) to standard output. With the -s
option, the output of
this command can be evaluated directly within the shelleval $(hub alias -s bash)
git init
-g
OPTIONS:origin
at
"git@github.com:USER/REPOSITORY.git"; USER is your GitHub username and
REPOSITORY is the current working directory's basename.git clone
[-p
] OPTIONS [USER/
]REPOSITORY DIRECTORY:-p
, use private remote
"git@github.com:USER/REPOSITORY.git".git remote add
[-p
] OPTIONS USER[/
REPOSITORY]:-p
, use private remote
"git@github.com:USER/REPOSITORY.git". If USER is "origin"
then uses your GitHub login.git push
REMOTE-1,REMOTE-2,...,REMOTE-N REF:git push
commands.git fork
:git browse
[-p
] [[USER/
]REPOSITORY]:open(1)
or the BROWSER
env variable. Use -p
to open a
page with https. If the repository isn't specified, browse
opens
the page of the repository found in the current directory.git submodule add
[-p
] OPTIONS [USER/]REPOSITORY DIRECTORY:-p
, use private remote
"git@github.com:USER/REPOSITORY.git".git fork
[--no-remote
]:github.token
to be set (see CONFIGURATION).git help
:Use git-config(1) to display the currently configured GitHub username:
$ git config --global github.user
Or, set the GitHub username and token with:
$ git config --global github.user <username>
$ git config --global github.token <token>
See http://github.com/guides/local-github-config for more information.
You can also tell hub
to use http://
rather than git://
when
cloning:
$ git config --global --add hub.http-clone yes
$ git clone schacon/ticgit
> git clone git://github.com/schacon/ticgit.git
$ git clone -p schacon/ticgit
> git clone git@github.com:schacon/ticgit.git
$ git clone resque
> git clone git://github.com/YOUR_USER/resque.git
$ git clone -p resque
> git clone git@github.com:YOUR_USER/resque.git
$ git remote add rtomayko
> git remote add rtomayko git://github.com/rtomayko/CURRENT_REPO.git
$ git remote add -p rtomayko
> git remote add rtomayko git@github.com:rtomayko/CURRENT_REPO.git
$ git remote add origin
> git remote add origin git://github.com/YOUR_USER/CURRENT_REPO.git
$ git fork
... hardcore forking action ...
> git remote add YOUR_USER git@github.com:YOUR_USER/CURRENT_REPO.git
$ git init -g
> git init
> git remote add origin git@github.com:YOUR_USER/REPO.git
$ git push origin,staging,qa bert_timeout
> git push origin bert_timeout
> git push staging bert_timeout
> git push qa bert_timeout
$ git browse schacon/ticgit
> open http://github.com/schacon/ticgit
$ git browse -p schacon/ticgit
> open http://github.com/schacon/ticgit
$ git browse resque
> open http://github.com/YOUR_USER/resque
$ git browse -p resque
> open https://github.com:YOUR_USER/resque
$ git help
> (improved git help)
$ git help hub
> (hub man page)
http://github.com/defunkt/hub/issues
Chris Wanstrath :: chris@ozmm.org :: @defunkt
git(1), git-clone(1), git-remote(1), git-init(1), http://github.com, http://github.com/defunkt/hub