hub(1)

  1. hub(1)
  2. Git Manual
  3. hub(1)

NAME

hub -- git + hub = github

SYNOPSIS

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]

DESCRIPTION

hub enhances various git commands with GitHub remote expansion. The alias command displays information on configuring your environment:

hub alias [-s] SHELL
Writes shell aliasing code for SHELL (bash, sh, zsh, csh) to standard output. With the -s option, the output of this command can be evaluated directly within the shell: eval $(hub alias -s bash)

After configuring the alias, the following commands have superpowers:

git init -g OPTIONS

Create a git repository as with git-init(1) and add remote 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

Clone repository "git://github.com/USER/REPOSITORY.git" into DIRECTORY as with git-clone(1). When USER/ is omitted, assumes your GitHub login. With -p, use private remote "git@github.com:USER/REPOSITORY.git".

git remote add [-p] OPTIONS USER[/REPOSITORY]

Add remote "git://github.com/USER/REPOSITORY.git" as with git-remote(1). When /REPOSITORY is omitted, the basename of the current working directory is used. With -p, use private remote "git@github.com:USER/REPOSITORY.git".

git help

Display enhanced git-help(1).

CONFIGURATION

Use git-config(1) to display the currently configured GitHub username:

$ git config --global github.user

Or, set the GitHub username with:

$ git config --global github.user <username>

See http://github.com/guides/local-github-config for more information.

BUGS

http://github.com/defunkt/hub/issues

AUTHOR

Chris Wanstrath :: chris@ozmm.org :: @defunkt

SEE ALSO

git(1), git-clone(1), git-remote(1), git-init(1), http://github.com, http://github.com/defunkt/hub

  1. DEFUNKT
  2. December 2009
  3. hub(1)