зеркало из https://github.com/mislav/hub.git
update man page to separate custom hub commands from git
This commit is contained in:
Родитель
49ba771a36
Коммит
691650a488
126
man/hub.1
126
man/hub.1
|
@ -12,13 +12,10 @@
|
|||
.br
|
||||
\fBhub alias\fR [\fB\-s\fR] \fISHELL\fR
|
||||
.
|
||||
.P
|
||||
.SS "Expanded git commands:"
|
||||
\fBgit init \-g\fR \fIOPTIONS\fR
|
||||
.
|
||||
.br
|
||||
\fBgit create\fR [\fINAME\fR] [\fB\-p\fR] [\fB\-d\fR \fIDESCRIPTION\fR] [\fB\-h\fR \fIHOMEPAGE\fR]
|
||||
.
|
||||
.br
|
||||
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
||||
.
|
||||
.br
|
||||
|
@ -46,97 +43,103 @@
|
|||
\fBgit push\fR \fIREMOTE\-1\fR,\fIREMOTE\-2\fR,\.\.\.,\fIREMOTE\-N\fR [\fIREF\fR]
|
||||
.
|
||||
.br
|
||||
\fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
||||
.
|
||||
.SS "Custom git commands:"
|
||||
\fBgit create\fR [\fINAME\fR] [\fB\-p\fR] [\fB\-d\fR \fIDESCRIPTION\fR] [\fB\-h\fR \fIHOMEPAGE\fR]
|
||||
.
|
||||
.br
|
||||
\fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]
|
||||
.
|
||||
.br
|
||||
\fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR
|
||||
.
|
||||
.br
|
||||
\fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR
|
||||
.
|
||||
.br
|
||||
\fBgit fork\fR [\fB\-\-no\-remote\fR]
|
||||
.
|
||||
.br
|
||||
\fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]:
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
\fBhub\fR enhances various \fBgit\fR commands with GitHub remote expansion\. The alias command displays information on configuring your environment:
|
||||
hub enhances various git commands to ease most common workflows with GitHub\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBhub \-\-noop\fR \fICOMMAND\fR: Shows which command(s) would be run as a result of the current command\. Doesn\'t perform anything\.
|
||||
.TP
|
||||
\fBhub \-\-noop\fR \fICOMMAND\fR
|
||||
Shows which command(s) would be run as a result of the current command\. Doesn\'t perform anything\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\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:
|
||||
.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:
|
||||
.
|
||||
.br
|
||||
\fBeval $(hub alias \-s bash)\fR
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\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 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\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit create\fR [\fINAME\fR] [\fB\-p\fR] [\fB\-d\fR \fIDESCRIPTION\fR] [\fB\-h\fR \fIHOMEPAGE\fR]:
|
||||
.
|
||||
.br
|
||||
Create a new public GitHub repository from the current git repository 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 name\. To explicitly name the new repository, pass in \fINAME\fR, optionally in \fIORGANIZATION\fR/\fINAME\fR form to create under an organization you\'re a member of\. With \fB\-p\fR, create a private repository, and with \fB\-d\fR and \fB\-h\fR set the repository\'s description and homepage URL, respectively\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit clone\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR \fIDIRECTORY\fR:
|
||||
.
|
||||
.br
|
||||
.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, clone private repositories over SSH\. For repositories under your GitHub login, \fB\-p\fR is implicit\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit remote add\fR [\fB\-p\fR] \fIOPTIONS\fR \fIUSER\fR[\fB/\fR\fIREPOSITORY\fR]:
|
||||
.
|
||||
.br
|
||||
.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\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
.TP
|
||||
\fBgit remote set\-url\fR [\fB\-p\fR] \fIOPTIONS\fR \fIREMOTE\-NAME\fR \fIUSER\fR[/\fIREPOSITORY\fR]
|
||||
.
|
||||
.br
|
||||
Sets the url of remote \fIREMOTE\-NAME\fR using the same rules as \fBgit remote add\fR\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit fetch\fR \fIUSER\-1\fR,[\fIUSER\-2\fR,\.\.\.]: Adds missing remote(s) with \fBgit remote add\fR prior to fetching\. New remotes are only added if they correspond to valid forks on GitHub\.
|
||||
.TP
|
||||
\fBgit fetch\fR \fIUSER\-1\fR,[\fIUSER\-2\fR,\.\.\.]
|
||||
Adds missing remote(s) with \fBgit remote add\fR prior to fetching\. New remotes are only added if they correspond to valid forks on GitHub\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit checkout\fR \fIPULLREQ\-URL\fR [\fIBRANCH\fR]: Checks out the head of the pull request as a local branch, to allow for reviewing, rebasing and otherwise cleaning up the commits in the pull request before merging\. The name of the local branch can explicitly be set with \fIBRANCH\fR\.
|
||||
.TP
|
||||
\fBgit checkout\fR \fIPULLREQ\-URL\fR [\fIBRANCH\fR]
|
||||
Checks out the head of the pull request as a local branch, to allow for reviewing, rebasing and otherwise cleaning up the commits in the pull request before merging\. The name of the local branch can explicitly be set with \fIBRANCH\fR\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit cherry\-pick\fR \fIGITHUB\-REF\fR: Cherry\-pick a commit from a fork using either full URL to the commit or GitHub\-flavored Markdown notation, which is \fBuser@sha\fR\. If the remote doesn\'t yet exist, it will be added\. A \fBgit fetch <user>\fR is issued prior to the cherry\-pick attempt\.
|
||||
.TP
|
||||
\fBgit cherry\-pick\fR \fIGITHUB\-REF\fR
|
||||
Cherry\-pick a commit from a fork using either full URL to the commit or GitHub\-flavored Markdown notation, which is \fBuser@sha\fR\. If the remote doesn\'t yet exist, it will be added\. A \fBgit fetch <user>\fR is issued prior to the cherry\-pick attempt\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit [am|apply]\fR \fIGITHUB\-URL\fR: Downloads the patch file for the pull request or commit at the URL and applies that patch from disk with \fBgit am\fR or \fBgit apply\fR\. Similar to \fBcherry\-pick\fR, but doesn\'t add new remotes\. \fBgit am\fR creates commits while preserving authorship info while \fBapply\fR only applies the patch to the working copy\.
|
||||
.TP
|
||||
\fBgit [am|apply]\fR \fIGITHUB\-URL\fR
|
||||
Downloads the patch file for the pull request or commit at the URL and applies that patch from disk with \fBgit am\fR or \fBgit apply\fR\. Similar to \fBcherry\-pick\fR, but doesn\'t add new remotes\. \fBgit am\fR creates commits while preserving authorship info while \fBapply\fR only applies the patch to the working copy\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\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 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\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]: Open repository\'s GitHub page in the system\'s default web browser using \fBopen(1)\fR or the \fBBROWSER\fR env variable\. If the repository isn\'t specified, \fBbrowse\fR opens the page of the repository found in the current directory\. If SUBPAGE is specified, the browser will open on the specified subpage: one of "wiki", "commits", "issues" or other (the default is "tree")\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR: Open a GitHub compare view page in the system\'s default web browser\. \fISTART\fR to \fIEND\fR are branch names, tag names, or commit SHA1s specifying the range of history to compare\. If a range with two dots (\fBa\.\.b\fR) is given, it will be transformed into one with three dots\. If \fISTART\fR is omitted, GitHub will compare against the base branch (the default is "master")\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit submodule add\fR [\fB\-p\fR] \fIOPTIONS\fR [\fIUSER\fR/]\fIREPOSITORY\fR \fIDIRECTORY\fR:
|
||||
.
|
||||
.br
|
||||
.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"\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit fork\fR [\fB\-\-no\-remote\fR]: Forks the original project (referenced by "origin" remote) on GitHub and adds a new remote for it under your username\. Requires \fBgithub\.token\fR to be set (see CONFIGURATION)\.
|
||||
.TP
|
||||
\fBgit help\fR
|
||||
Display enhanced git\-help(1)\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]:
|
||||
.P
|
||||
hub also adds some custom commands that are otherwise not present in git:
|
||||
.
|
||||
.br
|
||||
\fBgit pull\-request\fR [\fB\-f\fR] \fIISSUE\-URL\fR [\fB\-h\fR \fIHEAD\fR]:
|
||||
.TP
|
||||
\fBgit create\fR [\fINAME\fR] [\fB\-p\fR] [\fB\-d\fR \fIDESCRIPTION\fR] [\fB\-h\fR \fIHOMEPAGE\fR]
|
||||
Create a new public GitHub repository from the current git repository 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 name\. To explicitly name the new repository, pass in \fINAME\fR, optionally in \fIORGANIZATION\fR/\fINAME\fR form to create under an organization you\'re a member of\. With \fB\-p\fR, create a private repository, and with \fB\-d\fR and \fB\-h\fR set the repository\'s description and homepage URL, respectively\.
|
||||
.
|
||||
.br
|
||||
Opens a pull request on GitHub for the project that the "origin" remote points to\. The default head of the pull request is the current branch\. Both base and head of the pull request can be explicitly given in one of the following formats: "branch", "owner:branch", "owner/repo:branch"\. This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote\. To skip this check, use \fB\-f\fR\.
|
||||
.TP
|
||||
\fBgit browse\fR [\fB\-u\fR] [[\fIUSER\fR\fB/\fR]\fIREPOSITORY\fR] [SUBPAGE]
|
||||
Open repository\'s GitHub page in the system\'s default web browser using \fBopen(1)\fR or the \fBBROWSER\fR env variable\. If the repository isn\'t specified, \fBbrowse\fR opens the page of the repository found in the current directory\. If SUBPAGE is specified, the browser will open on the specified subpage: one of "wiki", "commits", "issues" or other (the default is "tree")\.
|
||||
.
|
||||
.TP
|
||||
\fBgit compare\fR [\fB\-u\fR] [\fIUSER\fR] [\fISTART\fR\.\.\.]\fIEND\fR
|
||||
Open a GitHub compare view page in the system\'s default web browser\. \fISTART\fR to \fIEND\fR are branch names, tag names, or commit SHA1s specifying the range of history to compare\. If a range with two dots (\fBa\.\.b\fR) is given, it will be transformed into one with three dots\. If \fISTART\fR is omitted, GitHub will compare against the base branch (the default is "master")\.
|
||||
.
|
||||
.TP
|
||||
\fBgit fork\fR [\fB\-\-no\-remote\fR]
|
||||
Forks the original project (referenced by "origin" remote) on GitHub and adds a new remote for it under your username\. Requires \fBgithub\.token\fR to be set (see CONFIGURATION)\.
|
||||
.
|
||||
.TP
|
||||
\fBgit pull\-request\fR [\fB\-f\fR] [\fITITLE\fR|\fB\-i\fR \fIISSUE\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
|
||||
\fBgit pull\-request\fR [\fB\-f\fR] \fIISSUE\-URL\fR [\fB\-h\fR \fIHEAD\fR] Opens a pull request on GitHub for the project that the "origin" remote points to\. The default head of the pull request is the current branch\. Both base and head of the pull request can be explicitly given in one of the following formats: "branch", "owner:branch", "owner/repo:branch"\. This command will abort operation if it detects that the current topic branch has local commits that are not yet pushed to its upstream branch on the remote\. To skip this check, use \fB\-f\fR\.
|
||||
.
|
||||
.IP
|
||||
If \fITITLE\fR is omitted, a text editor will open in which title and body of the pull request can be entered in the same manner as git commit message\.
|
||||
|
@ -144,11 +147,6 @@ If \fITITLE\fR is omitted, a text editor will open in which title and body of th
|
|||
.IP
|
||||
If instead of normal \fITITLE\fR an issue number is given with \fB\-i\fR, the pull request will be attached to an existing GitHub issue\. Alternatively, instead of title you can paste a full URL to an issue on GitHub\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit help\fR: Display enhanced git\-help(1)\.
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "CONFIGURATION"
|
||||
Use git\-config(1) to display the currently configured GitHub username:
|
||||
.
|
||||
|
|
138
man/hub.1.html
138
man/hub.1.html
|
@ -79,8 +79,9 @@
|
|||
<p><code>hub</code> [<code>--noop</code>] <var>COMMAND</var> <var>OPTIONS</var><br />
|
||||
<code>hub alias</code> [<code>-s</code>] <var>SHELL</var></p>
|
||||
|
||||
<h3 id="Expanded-git-commands-">Expanded git commands:</h3>
|
||||
|
||||
<p><code>git init -g</code> <var>OPTIONS</var><br />
|
||||
<code>git create</code> [<var>NAME</var>] [<code>-p</code>] [<code>-d</code> <var>DESCRIPTION</var>] [<code>-h</code> <var>HOMEPAGE</var>]<br />
|
||||
<code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var><br />
|
||||
<code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[/<var>REPOSITORY</var>]<br />
|
||||
<code>git remote set-url</code> [<code>-p</code>] <var>OPTIONS</var> <var>REMOTE-NAME</var> <var>USER</var>[/<var>REPOSITORY</var>]<br />
|
||||
|
@ -90,99 +91,92 @@
|
|||
<code>git am</code> <var>GITHUB-URL</var><br />
|
||||
<code>git apply</code> <var>GITHUB-URL</var><br />
|
||||
<code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> [<var>REF</var>]<br />
|
||||
<code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var></p>
|
||||
|
||||
<h3 id="Custom-git-commands-">Custom git commands:</h3>
|
||||
|
||||
<p><code>git create</code> [<var>NAME</var>] [<code>-p</code>] [<code>-d</code> <var>DESCRIPTION</var>] [<code>-h</code> <var>HOMEPAGE</var>]<br />
|
||||
<code>git browse</code> [<code>-u</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>] [SUBPAGE]<br />
|
||||
<code>git compare</code> [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var><br />
|
||||
<code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var><br />
|
||||
<code>git fork</code> [<code>--no-remote</code>]<br />
|
||||
<code>git pull-request</code> [<code>-f</code>] [<var>TITLE</var>|<code>-i</code> <var>ISSUE</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]:</p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
<p><code>hub</code> enhances various <code>git</code> commands with GitHub remote expansion. The
|
||||
alias command displays information on configuring your environment:</p>
|
||||
<p>hub enhances various git commands to ease most common workflows with GitHub.</p>
|
||||
|
||||
<ul>
|
||||
<li><p><code>hub --noop</code> <var>COMMAND</var>:
|
||||
Shows which command(s) would be run as a result of the current command.
|
||||
Doesn't perform anything.</p></li>
|
||||
<li><p><code>hub alias</code> [<code>-s</code>] <var>SHELL</var>:
|
||||
Writes shell aliasing code for <var>SHELL</var> (<code>bash</code>, <code>sh</code>, <code>zsh</code>,
|
||||
<dl>
|
||||
<dt><code>hub --noop</code> <var>COMMAND</var></dt><dd><p>Shows which command(s) would be run as a result of the current command.
|
||||
Doesn't perform anything.</p></dd>
|
||||
<dt><code>hub alias</code> [<code>-s</code>] <var>SHELL</var></dt><dd><p>Writes shell aliasing code for <var>SHELL</var> (<code>bash</code>, <code>sh</code>, <code>zsh</code>,
|
||||
<code>csh</code>) to standard output. With the <code>-s</code> option, the output of
|
||||
this command can be evaluated directly within the shell:<br />
|
||||
<code>eval $(hub alias -s bash)</code></p></li>
|
||||
<li><p><code>git init</code> <code>-g</code> <var>OPTIONS</var>:
|
||||
Create a git repository as with <span class="man-ref">git-init<span class="s">(1)</span></span> and add remote <code>origin</code> at
|
||||
<code>eval $(hub alias -s bash)</code></p></dd>
|
||||
<dt><code>git init</code> <code>-g</code> <var>OPTIONS</var></dt><dd><p>Create a git repository as with <span class="man-ref">git-init<span class="s">(1)</span></span> and add remote <code>origin</code> at
|
||||
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git"; <var>USER</var> is your GitHub username and
|
||||
<var>REPOSITORY</var> is the current working directory's basename.</p></li>
|
||||
<li><p><code>git create</code> [<var>NAME</var>] [<code>-p</code>] [<code>-d</code> <var>DESCRIPTION</var>] [<code>-h</code> <var>HOMEPAGE</var>]:<br />
|
||||
Create a new public GitHub repository from the current git
|
||||
<var>REPOSITORY</var> is the current working directory's basename.</p></dd>
|
||||
<dt><code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var><code>/</code>]<var>REPOSITORY</var> <var>DIRECTORY</var></dt><dd><p>Clone repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
||||
<var>DIRECTORY</var> as with <span class="man-ref">git-clone<span class="s">(1)</span></span>. When <var>USER</var>/ is omitted, assumes
|
||||
your GitHub login. With <code>-p</code>, clone private repositories over SSH.
|
||||
For repositories under your GitHub login, <code>-p</code> is implicit.</p></dd>
|
||||
<dt><code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[<code>/</code><var>REPOSITORY</var>]</dt><dd><p>Add remote "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" as with
|
||||
<span class="man-ref">git-remote<span class="s">(1)</span></span>. When /<var>REPOSITORY</var> is omitted, the basename of the
|
||||
current working directory is used. With <code>-p</code>, use private remote
|
||||
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git". If <var>USER</var> is "origin"
|
||||
then uses your GitHub login.</p></dd>
|
||||
<dt><code>git remote set-url</code> [<code>-p</code>] <var>OPTIONS</var> <var>REMOTE-NAME</var> <var>USER</var>[/<var>REPOSITORY</var>]</dt><dd><p>Sets the url of remote <var>REMOTE-NAME</var> using the same rules as
|
||||
<code>git remote add</code>.</p></dd>
|
||||
<dt><code>git fetch</code> <var>USER-1</var>,[<var>USER-2</var>,...]</dt><dd><p>Adds missing remote(s) with <code>git remote add</code> prior to fetching. New
|
||||
remotes are only added if they correspond to valid forks on GitHub.</p></dd>
|
||||
<dt><code>git checkout</code> <var>PULLREQ-URL</var> [<var>BRANCH</var>]</dt><dd><p>Checks out the head of the pull request as a local branch, to allow for
|
||||
reviewing, rebasing and otherwise cleaning up the commits in the pull
|
||||
request before merging. The name of the local branch can explicitly be
|
||||
set with <var>BRANCH</var>.</p></dd>
|
||||
<dt><code>git cherry-pick</code> <var>GITHUB-REF</var></dt><dd><p>Cherry-pick a commit from a fork using either full URL to the commit
|
||||
or GitHub-flavored Markdown notation, which is <code>user@sha</code>. If the remote
|
||||
doesn't yet exist, it will be added. A <code>git fetch <user></code> is issued
|
||||
prior to the cherry-pick attempt.</p></dd>
|
||||
<dt><code>git [am|apply]</code> <var>GITHUB-URL</var></dt><dd><p>Downloads the patch file for the pull request or commit at the URL and
|
||||
applies that patch from disk with <code>git am</code> or <code>git apply</code>. Similar to
|
||||
<code>cherry-pick</code>, but doesn't add new remotes. <code>git am</code> creates commits while
|
||||
preserving authorship info while <code>apply</code> only applies the patch to the
|
||||
working copy.</p></dd>
|
||||
<dt><code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> [<var>REF</var>]</dt><dd><p>Push <var>REF</var> to each of <var>REMOTE-1</var> through <var>REMOTE-N</var> by executing
|
||||
multiple <code>git push</code> commands.</p></dd>
|
||||
<dt><code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var></dt><dd><p>Submodule repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
||||
<var>DIRECTORY</var> as with <span class="man-ref">git-submodule<span class="s">(1)</span></span>. When <var>USER</var>/ is omitted, assumes
|
||||
your GitHub login. With <code>-p</code>, use private remote
|
||||
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git".</p></dd>
|
||||
<dt><code>git help</code></dt><dd><p>Display enhanced <span class="man-ref">git-help<span class="s">(1)</span></span>.</p></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<p>hub also adds some custom commands that are otherwise not present in git:</p>
|
||||
|
||||
<dl>
|
||||
<dt><code>git create</code> [<var>NAME</var>] [<code>-p</code>] [<code>-d</code> <var>DESCRIPTION</var>] [<code>-h</code> <var>HOMEPAGE</var>]</dt><dd><p>Create a new public GitHub repository from the current git
|
||||
repository and add remote <code>origin</code> at
|
||||
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git"; <var>USER</var> is your GitHub
|
||||
username and <var>REPOSITORY</var> is the current working directory name.
|
||||
To explicitly name the new repository, pass in <var>NAME</var>, optionally in
|
||||
<var>ORGANIZATION</var>/<var>NAME</var> form to create under an organization you're a
|
||||
member of. With <code>-p</code>, create a private repository, and with <code>-d</code> and <code>-h</code>
|
||||
set the repository's description and homepage URL, respectively.</p></li>
|
||||
<li><p><code>git clone</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var><code>/</code>]<var>REPOSITORY</var> <var>DIRECTORY</var>:<br />
|
||||
Clone repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
||||
<var>DIRECTORY</var> as with <span class="man-ref">git-clone<span class="s">(1)</span></span>. When <var>USER</var>/ is omitted, assumes
|
||||
your GitHub login. With <code>-p</code>, clone private repositories over SSH.
|
||||
For repositories under your GitHub login, <code>-p</code> is implicit.</p></li>
|
||||
<li><p><code>git remote add</code> [<code>-p</code>] <var>OPTIONS</var> <var>USER</var>[<code>/</code><var>REPOSITORY</var>]:<br />
|
||||
Add remote "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" as with
|
||||
<span class="man-ref">git-remote<span class="s">(1)</span></span>. When /<var>REPOSITORY</var> is omitted, the basename of the
|
||||
current working directory is used. With <code>-p</code>, use private remote
|
||||
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git". If <var>USER</var> is "origin"
|
||||
then uses your GitHub login.</p></li>
|
||||
<li><p><code>git remote set-url</code> [<code>-p</code>] <var>OPTIONS</var> <var>REMOTE-NAME</var> <var>USER</var>[/<var>REPOSITORY</var>]<br />
|
||||
Sets the url of remote <var>REMOTE-NAME</var> using the same rules as
|
||||
<code>git remote add</code>.</p></li>
|
||||
<li><p><code>git fetch</code> <var>USER-1</var>,[<var>USER-2</var>,...]:
|
||||
Adds missing remote(s) with <code>git remote add</code> prior to fetching. New
|
||||
remotes are only added if they correspond to valid forks on GitHub.</p></li>
|
||||
<li><p><code>git checkout</code> <var>PULLREQ-URL</var> [<var>BRANCH</var>]:
|
||||
Checks out the head of the pull request as a local branch, to allow for
|
||||
reviewing, rebasing and otherwise cleaning up the commits in the pull
|
||||
request before merging. The name of the local branch can explicitly be
|
||||
set with <var>BRANCH</var>.</p></li>
|
||||
<li><p><code>git cherry-pick</code> <var>GITHUB-REF</var>:
|
||||
Cherry-pick a commit from a fork using either full URL to the commit
|
||||
or GitHub-flavored Markdown notation, which is <code>user@sha</code>. If the remote
|
||||
doesn't yet exist, it will be added. A <code>git fetch <user></code> is issued
|
||||
prior to the cherry-pick attempt.</p></li>
|
||||
<li><p><code>git [am|apply]</code> <var>GITHUB-URL</var>:
|
||||
Downloads the patch file for the pull request or commit at the URL and
|
||||
applies that patch from disk with <code>git am</code> or <code>git apply</code>. Similar to
|
||||
<code>cherry-pick</code>, but doesn't add new remotes. <code>git am</code> creates commits while
|
||||
preserving authorship info while <code>apply</code> only applies the patch to the
|
||||
working copy.</p></li>
|
||||
<li><p><code>git push</code> <var>REMOTE-1</var>,<var>REMOTE-2</var>,...,<var>REMOTE-N</var> [<var>REF</var>]:
|
||||
Push <var>REF</var> to each of <var>REMOTE-1</var> through <var>REMOTE-N</var> by executing
|
||||
multiple <code>git push</code> commands.</p></li>
|
||||
<li><p><code>git browse</code> [<code>-u</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>] [SUBPAGE]:
|
||||
Open repository's GitHub page in the system's default web browser using
|
||||
set the repository's description and homepage URL, respectively.</p></dd>
|
||||
<dt><code>git browse</code> [<code>-u</code>] [[<var>USER</var><code>/</code>]<var>REPOSITORY</var>] [SUBPAGE]</dt><dd><p>Open repository's GitHub page in the system's default web browser using
|
||||
<code>open(1)</code> or the <code>BROWSER</code> env variable. If the repository isn't
|
||||
specified, <code>browse</code> opens the page of the repository found in the current
|
||||
directory. If SUBPAGE is specified, the browser will open on the specified
|
||||
subpage: one of "wiki", "commits", "issues" or other (the default is
|
||||
"tree").</p></li>
|
||||
<li><p><code>git compare</code> [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var>:
|
||||
Open a GitHub compare view page in the system's default web browser.
|
||||
"tree").</p></dd>
|
||||
<dt><code>git compare</code> [<code>-u</code>] [<var>USER</var>] [<var>START</var>...]<var>END</var></dt><dd><p>Open a GitHub compare view page in the system's default web browser.
|
||||
<var>START</var> to <var>END</var> are branch names, tag names, or commit SHA1s specifying
|
||||
the range of history to compare. If a range with two dots (<code>a..b</code>) is given,
|
||||
it will be transformed into one with three dots. If <var>START</var> is omitted,
|
||||
GitHub will compare against the base branch (the default is "master").</p></li>
|
||||
<li><p><code>git submodule add</code> [<code>-p</code>] <var>OPTIONS</var> [<var>USER</var>/]<var>REPOSITORY</var> <var>DIRECTORY</var>:<br />
|
||||
Submodule repository "git://github.com/<var>USER</var>/<var>REPOSITORY</var>.git" into
|
||||
<var>DIRECTORY</var> as with <span class="man-ref">git-submodule<span class="s">(1)</span></span>. When <var>USER</var>/ is omitted, assumes
|
||||
your GitHub login. With <code>-p</code>, use private remote
|
||||
"git@github.com:<var>USER</var>/<var>REPOSITORY</var>.git".</p></li>
|
||||
<li><p><code>git fork</code> [<code>--no-remote</code>]:
|
||||
Forks the original project (referenced by "origin" remote) on GitHub and
|
||||
GitHub will compare against the base branch (the default is "master").</p></dd>
|
||||
<dt><code>git fork</code> [<code>--no-remote</code>]</dt><dd><p>Forks the original project (referenced by "origin" remote) on GitHub and
|
||||
adds a new remote for it under your username. Requires <code>github.token</code> to
|
||||
be set (see CONFIGURATION).</p></li>
|
||||
<li><p><code>git pull-request</code> [<code>-f</code>] [<var>TITLE</var>|<code>-i</code> <var>ISSUE</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]:<br />
|
||||
<code>git pull-request</code> [<code>-f</code>] <var>ISSUE-URL</var> [<code>-h</code> <var>HEAD</var>]:<br />
|
||||
be set (see CONFIGURATION).</p></dd>
|
||||
<dt><code>git pull-request</code> [<code>-f</code>] [<var>TITLE</var>|<code>-i</code> <var>ISSUE</var>] [<code>-b</code> <var>BASE</var>] [<code>-h</code> <var>HEAD</var>]</dt><dd><p><code>git pull-request</code> [<code>-f</code>] <var>ISSUE-URL</var> [<code>-h</code> <var>HEAD</var>]
|
||||
Opens a pull request on GitHub for the project that the "origin" remote
|
||||
points to. The default head of the pull request is the current branch.
|
||||
Both base and head of the pull request can be explicitly given in one of
|
||||
|
@ -196,10 +190,8 @@ the pull request can be entered in the same manner as git commit message.</p>
|
|||
|
||||
<p>If instead of normal <var>TITLE</var> an issue number is given with <code>-i</code>, the pull
|
||||
request will be attached to an existing GitHub issue. Alternatively, instead
|
||||
of title you can paste a full URL to an issue on GitHub.</p></li>
|
||||
<li><p><code>git help</code>:
|
||||
Display enhanced <span class="man-ref">git-help<span class="s">(1)</span></span>.</p></li>
|
||||
</ul>
|
||||
of title you can paste a full URL to an issue on GitHub.</p></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h2 id="CONFIGURATION">CONFIGURATION</h2>
|
||||
|
|
|
@ -6,8 +6,9 @@ hub(1) -- git + hub = github
|
|||
`hub` [`--noop`] <COMMAND> <OPTIONS>
|
||||
`hub alias` [`-s`] <SHELL>
|
||||
|
||||
### Expanded git commands:
|
||||
|
||||
`git init -g` <OPTIONS>
|
||||
`git create` [<NAME>] [`-p`] [`-d` <DESCRIPTION>] [`-h` <HOMEPAGE>]
|
||||
`git clone` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
||||
`git remote add` [`-p`] <OPTIONS> <USER>[/<REPOSITORY>]
|
||||
`git remote set-url` [`-p`] <OPTIONS> <REMOTE-NAME> <USER>[/<REPOSITORY>]
|
||||
|
@ -17,16 +18,19 @@ hub(1) -- git + hub = github
|
|||
`git am` <GITHUB-URL>
|
||||
`git apply` <GITHUB-URL>
|
||||
`git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> [<REF>]
|
||||
`git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
||||
|
||||
### Custom git commands:
|
||||
|
||||
`git create` [<NAME>] [`-p`] [`-d` <DESCRIPTION>] [`-h` <HOMEPAGE>]
|
||||
`git browse` [`-u`] [[<USER>`/`]<REPOSITORY>] [SUBPAGE]
|
||||
`git compare` [`-u`] [<USER>] [<START>...]<END>
|
||||
`git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>
|
||||
`git fork` [`--no-remote`]
|
||||
`git pull-request` [`-f`] [<TITLE>|`-i` <ISSUE>] [`-b` <BASE>] [`-h` <HEAD>]:
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
`hub` enhances various `git` commands with GitHub remote expansion. The
|
||||
alias command displays information on configuring your environment:
|
||||
hub enhances various git commands to ease most common workflows with GitHub.
|
||||
|
||||
* `hub --noop` <COMMAND>:
|
||||
Shows which command(s) would be run as a result of the current command.
|
||||
|
@ -43,30 +47,20 @@ alias command displays information on configuring your environment:
|
|||
"git@github.com:<USER>/<REPOSITORY>.git"; <USER> is your GitHub username and
|
||||
<REPOSITORY> is the current working directory's basename.
|
||||
|
||||
* `git create` [<NAME>] [`-p`] [`-d` <DESCRIPTION>] [`-h` <HOMEPAGE>]:
|
||||
Create a new public GitHub repository from the current git
|
||||
repository and add remote `origin` at
|
||||
"git@github.com:<USER>/<REPOSITORY>.git"; <USER> is your GitHub
|
||||
username and <REPOSITORY> is the current working directory name.
|
||||
To explicitly name the new repository, pass in <NAME>, optionally in
|
||||
<ORGANIZATION>/<NAME> form to create under an organization you're a
|
||||
member of. With `-p`, create a private repository, and with `-d` and `-h`
|
||||
set the repository's description and homepage URL, respectively.
|
||||
|
||||
* `git clone` [`-p`] <OPTIONS> [<USER>`/`]<REPOSITORY> <DIRECTORY>:
|
||||
* `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`, clone private repositories over SSH.
|
||||
For repositories under your GitHub login, `-p` is implicit.
|
||||
|
||||
* `git remote add` [`-p`] <OPTIONS> <USER>[`/`<REPOSITORY>]:
|
||||
* `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". If <USER> is "origin"
|
||||
then uses your GitHub login.
|
||||
|
||||
* `git remote set-url` [`-p`] <OPTIONS> <REMOTE-NAME> <USER>[/<REPOSITORY>]
|
||||
* `git remote set-url` [`-p`] <OPTIONS> <REMOTE-NAME> <USER>[/<REPOSITORY>]:
|
||||
Sets the url of remote <REMOTE-NAME> using the same rules as
|
||||
`git remote add`.
|
||||
|
||||
|
@ -97,6 +91,27 @@ alias command displays information on configuring your environment:
|
|||
Push <REF> to each of <REMOTE-1> through <REMOTE-N> by executing
|
||||
multiple `git push` commands.
|
||||
|
||||
* `git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>:
|
||||
Submodule repository "git://github.com/<USER>/<REPOSITORY>.git" into
|
||||
<DIRECTORY> as with git-submodule(1). When <USER>/ is omitted, assumes
|
||||
your GitHub login. With `-p`, use private remote
|
||||
"git@github.com:<USER>/<REPOSITORY>.git".
|
||||
|
||||
* `git help`:
|
||||
Display enhanced git-help(1).
|
||||
|
||||
hub also adds some custom commands that are otherwise not present in git:
|
||||
|
||||
* `git create` [<NAME>] [`-p`] [`-d` <DESCRIPTION>] [`-h` <HOMEPAGE>]:
|
||||
Create a new public GitHub repository from the current git
|
||||
repository and add remote `origin` at
|
||||
"git@github.com:<USER>/<REPOSITORY>.git"; <USER> is your GitHub
|
||||
username and <REPOSITORY> is the current working directory name.
|
||||
To explicitly name the new repository, pass in <NAME>, optionally in
|
||||
<ORGANIZATION>/<NAME> form to create under an organization you're a
|
||||
member of. With `-p`, create a private repository, and with `-d` and `-h`
|
||||
set the repository's description and homepage URL, respectively.
|
||||
|
||||
* `git browse` [`-u`] [[<USER>`/`]<REPOSITORY>] [SUBPAGE]:
|
||||
Open repository's GitHub page in the system's default web browser using
|
||||
`open(1)` or the `BROWSER` env variable. If the repository isn't
|
||||
|
@ -112,19 +127,13 @@ alias command displays information on configuring your environment:
|
|||
it will be transformed into one with three dots. If <START> is omitted,
|
||||
GitHub will compare against the base branch (the default is "master").
|
||||
|
||||
* `git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>:
|
||||
Submodule repository "git://github.com/<USER>/<REPOSITORY>.git" into
|
||||
<DIRECTORY> as with git-submodule(1). When <USER>/ is omitted, assumes
|
||||
your GitHub login. With `-p`, use private remote
|
||||
"git@github.com:<USER>/<REPOSITORY>.git".
|
||||
|
||||
* `git fork` [`--no-remote`]:
|
||||
Forks the original project (referenced by "origin" remote) on GitHub and
|
||||
adds a new remote for it under your username. Requires `github.token` to
|
||||
be set (see CONFIGURATION).
|
||||
|
||||
* `git pull-request` [`-f`] [<TITLE>|`-i` <ISSUE>] [`-b` <BASE>] [`-h` <HEAD>]:
|
||||
`git pull-request` [`-f`] <ISSUE-URL> [`-h` <HEAD>]:
|
||||
* `git pull-request` [`-f`] [<TITLE>|`-i` <ISSUE>] [`-b` <BASE>] [`-h` <HEAD>]:
|
||||
`git pull-request` [`-f`] <ISSUE-URL> [`-h` <HEAD>]
|
||||
Opens a pull request on GitHub for the project that the "origin" remote
|
||||
points to. The default head of the pull request is the current branch.
|
||||
Both base and head of the pull request can be explicitly given in one of
|
||||
|
@ -140,9 +149,6 @@ alias command displays information on configuring your environment:
|
|||
request will be attached to an existing GitHub issue. Alternatively, instead
|
||||
of title you can paste a full URL to an issue on GitHub.
|
||||
|
||||
* `git help`:
|
||||
Display enhanced git-help(1).
|
||||
|
||||
## CONFIGURATION
|
||||
|
||||
Use git-config(1) to display the currently configured GitHub username:
|
||||
|
|
Загрузка…
Ссылка в новой задаче