hub(1) -- git + hub = github ============================ ## SYNOPSIS `hub` `hub alias` [`-s`] `git init -g` `git clone` [`-p`] [/] `git remote add` [`-p`] [/] ## DESCRIPTION `hub` enhances various `git` commands with GitHub remote expansion. The alias command displays information on configuring your environment: * `hub alias` [`-s`] : Writes shell aliasing code for (`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` : Create a git repository as with git-init(1) and add remote `origin` at "git@github.com:/.git"; is your GitHub username and is the current working directory's basename. * `git clone` [`-p`] [`/`] : Clone repository "git://github.com//.git" into as with git-clone(1). When / is omitted, assumes your GitHub login. With `-p`, use private remote "git@github.com:/.git". * `git remote add` [`-p`] [`/`]: Add remote "git://github.com//.git" as with git-remote(1). When / is omitted, the basename of the current working directory is used. With `-p`, use private remote "git@github.com:/.git". * `git push` ,,..., : Push to each of through by executing multiple `git push` commands. * `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 See for more information. You can also tell `hub` to use `http://` rather than `git://` when cloning: $ git config --global --add hub.http-clone yes ## EXAMPLES ### git clone $ 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 $ 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 init $ git init -g > git init > git remote add origin git@github.com:YOUR_USER/REPO.git ### git push $ git push origin,staging,qa bert_timeout > git push origin bert_timeout > git push staging bert_timeout > git push qa bert_timeout ### git help $ git help > (improved git help) $ git help hub > (hub man page) ## BUGS ## AUTHOR Chris Wanstrath :: chris@ozmm.org :: @defunkt ## SEE ALSO git(1), git-clone(1), git-remote(1), git-init(1), ,