Full docs: man hub
# on a Mac $ brew install hub # otherwise $ curl http://defunkt.github.com/hub/standalone -so ~/bin/hub $ chmod +x ~/bin/hub # wrapping git $ alias git=hub
$ git clone dotfiles → git clone git://github.com/YOUR_USER/dotfiles.git $ git clone defunkt/hub → git clone git://github.com/defunkt/hub.git # see the current project's wiki $ git browse -- wiki $ git browse mojombo/jekyll network → open http://github.com/mojombo/jekyll/network # import a repo as a submodule $ git submodule add technoweenie/permalink_fu vendor/plugins/permalink_fu
$ git init -g → git init → git remote add origin git@github.com:YOUR_USER/REPO.git # fetch from multiple forks $ git fetch mislav,cehoffman → git remote add mislav git://github.com/mislav/REPO.git → git remote add cehoffman git://github.com/cehoffman/REPO.git → git fetch --multiple mislav cehoffman # push to multiple remotes $ git push production,staging master
# fork the current repo ("defunkt/hub") $ git fork → (hardcore forking action...) → git remote add YOUR_USER git://github.com/YOUR_USER/hub.git # cherry-pick from web urls $ git cherry-pick http://github.com/xoebus/hub/commit/177eeb8 → git remote add xoebus git://github.com/xoebus/hub.git → git fetch xoebus → git cherry-pick 177eeb8 # copy the compare url for a feature branch to clipboard $ git compare -u feature | pbcopy → "http://github.com/OWNER/REPO/compare/feature"