.\" generated with Ronn/v0.4.1 .\" http://github.com/rtomayko/ronn/ . .TH "HUB" "1" "March 2010" "DEFUNKT" "Git Manual" . .SH "NAME" \fBhub\fR \-\- git + hub = github . .SH "SYNOPSIS" \fBhub\fR \fICOMMAND\fR \fIOPTIONS\fR . .br \fBhub alias\fR [\fB\-s\fR] \fISHELL\fR . .br . .P \fBgit init \-g\fR \fIOPTIONS\fR . .br \fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR . .br \fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[/\fIREPOSITORY\fR] . .br \fBgit browse\fR [\fB\-p\fR] [\fIUSER\fR/]\fIREPOSITORY\fR . .br \fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR . .SH "DESCRIPTION" \fBhub\fR enhances various \fBgit\fR commands with GitHub remote expansion. The alias command displays information on configuring your environment: . .TP \fBhub alias\fR [\fB\-s\fR] \fISHELL\fR Writes shell aliasing code for \fISHELL\fR (\fBbash\fR, \fBsh\fR, \fBzsh\fR, \fBcsh\fR) to standard output. With the \fB\-s\fR option, the output of this command can be evaluated directly within the shell: \fBeval $(hub alias \-s bash)\fR . .P After configuring the alias, the following commands have superpowers: . .TP \fBgit init\fR \fB\-g\fR \fIOPTIONS\fR Create a git repository as with git\-init(1) and add remote \fBorigin\fR at "git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git"; \fIUSER\fR is your GitHub username and \fIREPOSITORY\fR is the current working directory's basename. . .TP \fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR \fIDIRECTORY\fR Clone repository "git://github.com/\fIUSER\fR/\fIREPOSITORY\fR.git" into \fIDIRECTORY\fR as with git\-clone(1). When \fIUSER\fR/ is omitted, assumes your GitHub login. With \fB\-p\fR, use private remote "git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git". . .TP \fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[\fB/\fR\fIREPOSITORY\fR] Add remote "git://github.com/\fIUSER\fR/\fIREPOSITORY\fR.git" as with git\-remote(1). When /\fIREPOSITORY\fR is omitted, the basename of the current working directory is used. With \fB\-p\fR, use private remote "git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git". If \fIUSER\fR is "origin" then uses your GitHub login. . .TP \fBgit push\fR \fIREMOTE\-1\fR,\fIREMOTE\-2\fR,...,\fIREMOTE\-N\fR \fIREF\fR Push \fIREF\fR to each of \fIREMOTE\-1\fR through \fIREMOTE\-N\fR by executing multiple \fBgit push\fR commands. . .TP \fBgit browse\fR [\fB\-p\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] Open repository's GitHub page in the system's default web browser using \fBopen(1)\fR or the \fBBROWSER\fR env variable. Use \fB\-p\fR to open a page with https. If the repository isn't specified, \fBbrowse\fR opens the page of the repository found in the current directory. . .TP \fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR Submodule repository "git://github.com/\fIUSER\fR/\fIREPOSITORY\fR.git" into \fIDIRECTORY\fR as with git\-submodule(1). When \fIUSER\fR/ is omitted, assumes your GitHub login. With \fB\-p\fR, use private remote "git@github.com:\fIUSER\fR/\fIREPOSITORY\fR.git". . .TP \fBgit fork\fR [\fB\-\-no\-remote\fR] Forks the original project (as specified in "origin" remote) on GitHub and adds a new remote named \fIUSER\fR referencing the newly created repo. Requires \fBgithub.token\fR to be set (see CONFIGURATION). . .TP \fBgit help\fR Display enhanced git\-help(1). . .SH "CONFIGURATION" Use git\-config(1) to display the currently configured GitHub username: . .IP "" 4 . .nf $ git config \-\-global github.user . .fi . .IP "" 0 . .P Or, set the GitHub username and token with: . .IP "" 4 . .nf $ git config \-\-global github.user $ git config \-\-global github.token . .fi . .IP "" 0 . .P See \fIhttp://github.com/guides/local\-github\-config\fR for more information. . .P You can also tell \fBhub\fR to use \fBhttp://\fR rather than \fBgit://\fR when cloning: . .IP "" 4 . .nf $ git config \-\-global \-\-add hub.http\-clone yes . .fi . .IP "" 0 . .SH "EXAMPLES" . .SS "git clone" . .nf $ 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 . .fi . .SS "git remote add" . .nf $ 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 . .fi . .SS "git fork" . .nf $ git fork ... hardcore forking action ... > git remote add YOUR_USER git@github.com:YOUR_USER/CURRENT_REPO.git . .fi . .SS "git init" . .nf $ git init \-g > git init > git remote add origin git@github.com:YOUR_USER/REPO.git . .fi . .SS "git push" . .nf $ git push origin,staging,qa bert_timeout > git push origin bert_timeout > git push staging bert_timeout > git push qa bert_timeout . .fi . .SS "git browse" . .nf $ 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 . .fi . .SS "git help" . .nf $ git help > (improved git help) $ git help hub > (hub man page) . .fi . .SH "BUGS" \fIhttp://github.com/defunkt/hub/issues\fR . .SH "AUTHOR" Chris Wanstrath :: chris@ozmm.org :: @defunkt . .SH "SEE ALSO" git(1), git\-clone(1), git\-remote(1), git\-init(1),\fIhttp://github.com\fR, \fIhttp://github.com/defunkt/hub\fR