github.com/trevoraustin/hub@v2.2.0-preview1.0.20141105230840-96d8bfc654cc+incompatible/man/hub.1.ronn (about)

     1  hub(1) -- git + hub = github
     2  ============================
     3  
     4  ## SYNOPSIS
     5  
     6  `hub` [`--noop`] <COMMAND> <OPTIONS>  
     7  `hub alias` [`-s`] [<SHELL>]
     8  
     9  ### Expanded git commands:
    10  
    11  `git init -g` <OPTIONS>  
    12  `git clone` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>  
    13  `git remote add` [`-p`] <OPTIONS> <USER>[/<REPOSITORY>]  
    14  `git remote set-url` [`-p`] <OPTIONS> <REMOTE-NAME> <USER>[/<REPOSITORY>]  
    15  `git fetch` <USER-1>,[<USER-2>,...]  
    16  `git checkout` <PULLREQ-URL> [<BRANCH>]  
    17  `git merge` <PULLREQ-URL>  
    18  `git cherry-pick` <GITHUB-REF>  
    19  `git am` <GITHUB-URL>  
    20  `git apply` <GITHUB-URL>  
    21  `git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> [<REF>]  
    22  `git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>  
    23  
    24  ### Custom git commands:
    25  
    26  `git create` [<NAME>] [`-p`] [`-d` <DESCRIPTION>] [`-h` <HOMEPAGE>]  
    27  `git browse` [`-u`] [[<USER>`/`]<REPOSITORY>] [SUBPAGE]  
    28  `git compare` [`-u`] [<USER>] [[<START>...]<END>]  
    29  `git fork` [`--no-remote`]  
    30  `git pull-request` [`-o`|`--browse`] [`-f`] [`-m` <MESSAGE>|`-F` <FILE>|`-i` <ISSUE>|<ISSUE-URL>] [`-b` <BASE>] [`-h` <HEAD>]  
    31  `git ci-status` [`-v`] [<COMMIT>]
    32  
    33  ## DESCRIPTION
    34  
    35  hub enhances various git commands to ease most common workflows with GitHub.
    36  
    37    * `hub --noop` <COMMAND>:
    38      Shows which command(s) would be run as a result of the current command.
    39      Doesn't perform anything.
    40  
    41    * `hub alias` [`-s`] [<SHELL>]:
    42      Shows shell instructions for wrapping git. If given, <SHELL> specifies the
    43      type of shell; otherwise defaults to the value of SHELL environment
    44      variable.  With `-s`, outputs shell script suitable for `eval`.
    45  
    46    * `git init` `-g` <OPTIONS>:
    47      Create a git repository as with git-init(1) and add remote `origin` at
    48      "git@github.com:<USER>/<REPOSITORY>.git"; <USER> is your GitHub username and
    49      <REPOSITORY> is the current working directory's basename.
    50  
    51    * `git clone` [`-p`] <OPTIONS> [<USER>`/`]<REPOSITORY> <DIRECTORY>:
    52      Clone repository "git://github.com/<USER>/<REPOSITORY>.git" into
    53      <DIRECTORY> as with git-clone(1). When <USER>/ is omitted, assumes
    54      your GitHub login.
    55  
    56      If the repository is private or the current user has push access to the
    57      repository, hub will use the ssh protocol for cloning. Use `-p` to select
    58      the ssh protocol unconditionally. HTTPS protocol can be used instead by
    59      setting "hub.protocol" (see <CONFIGURATION>).
    60  
    61    * `git remote add` [`-p`] <OPTIONS> <USER>[`/`<REPOSITORY>]:
    62      Add remote "git://github.com/<USER>/<REPOSITORY>.git" as with
    63      git-remote(1). When /<REPOSITORY> is omitted, the basename of the
    64      current working directory is used. With `-p`, use private remote
    65      "git@github.com:<USER>/<REPOSITORY>.git". If <USER> is "origin"
    66      then uses your GitHub login.
    67  
    68    * `git remote set-url` [`-p`] <OPTIONS> <REMOTE-NAME> <USER>[/<REPOSITORY>]:
    69      Sets the url of remote <REMOTE-NAME> using the same rules as 
    70      `git remote add`.
    71  
    72    * `git fetch` <USER-1>,[<USER-2>,...]:
    73      Adds missing remote(s) with `git remote add` prior to fetching. New
    74      remotes are only added if they correspond to valid forks on GitHub.
    75  
    76    * `git checkout` <PULLREQ-URL> [<BRANCH>]:
    77      Checks out the head of the pull request as a local branch, to allow for
    78      reviewing, rebasing and otherwise cleaning up the commits in the pull
    79      request before merging. The name of the local branch can explicitly be
    80      set with <BRANCH>.
    81  
    82    * `git merge` <PULLREQ-URL>:
    83      Merge the pull request with a commit message that includes the pull request
    84      ID and title, similar to the GitHub Merge Button.
    85  
    86    * `git cherry-pick` <GITHUB-REF>:
    87      Cherry-pick a commit from a fork using either full URL to the commit
    88      or GitHub-flavored Markdown notation, which is `user@sha`. If the remote
    89      doesn't yet exist, it will be added. A `git fetch <user>` is issued
    90      prior to the cherry-pick attempt.
    91  
    92    * `git [am|apply]` <GITHUB-URL>:
    93      Downloads the patch file for the pull request or commit at the URL and
    94      applies that patch from disk with `git am` or `git apply`. Similar to
    95      `cherry-pick`, but doesn't add new remotes. `git am` creates commits while
    96      preserving authorship info while `apply` only applies the patch to the
    97      working copy.
    98  
    99    * `git push` <REMOTE-1>,<REMOTE-2>,...,<REMOTE-N> [<REF>]:
   100      Push <REF> to each of <REMOTE-1> through <REMOTE-N> by executing
   101      multiple `git push` commands.
   102  
   103    * `git submodule add` [`-p`] <OPTIONS> [<USER>/]<REPOSITORY> <DIRECTORY>:
   104      Submodule repository "git://github.com/<USER>/<REPOSITORY>.git" into
   105      <DIRECTORY> as with git-submodule(1). When <USER>/ is omitted, assumes
   106      your GitHub login. With `-p`, use private remote
   107      "git@github.com:<USER>/<REPOSITORY>.git".
   108  
   109    * `git help`:
   110      Display enhanced git-help(1).
   111  
   112  hub also adds some custom commands that are otherwise not present in git:
   113  
   114    * `git create` [<NAME>] [`-p`] [`-d` <DESCRIPTION>] [`-h` <HOMEPAGE>]:
   115      Create a new public GitHub repository from the current git
   116      repository and add remote `origin` at
   117      "git@github.com:<USER>/<REPOSITORY>.git"; <USER> is your GitHub
   118      username and <REPOSITORY> is the current working directory name.
   119      To explicitly name the new repository, pass in <NAME>, optionally in
   120      <ORGANIZATION>/<NAME> form to create under an organization you're a
   121      member of. With `-p`, create a private repository, and with `-d` and `-h`
   122      set the repository's description and homepage URL, respectively.
   123  
   124    * `git browse` [`-u`] [[<USER>`/`]<REPOSITORY>] [SUBPAGE]:
   125      Open repository's GitHub page in the system's default web browser using
   126      `open(1)` or the `BROWSER` env variable. If the repository isn't
   127      specified, `browse` opens the page of the repository found in the current
   128      directory. If SUBPAGE is specified, the browser will open on the specified
   129      subpage: one of "wiki", "commits", "issues" or other (the default is
   130      "tree"). With `-u`, outputs the URL rather than opening the browser.
   131  
   132    * `git compare` [`-u`] [<USER>] [[<START>...]<END>]:
   133      Open a GitHub compare view page in the system's default web browser.
   134      <START> to <END> are branch names, tag names, or commit SHA1s specifying
   135      the range of history to compare. If a range with two dots (`a..b`) is given,
   136      it will be transformed into one with three dots. If <START> is omitted,
   137      GitHub will compare against the base branch (the default is "master").
   138      If <END> is omitted, GitHub compare view is opened for the current branch.
   139      With `-u`, outputs the URL rather than opening the browser.
   140  
   141    * `git fork` [`--no-remote`]:
   142      Forks the original project (referenced by "origin" remote) on GitHub and
   143      adds a new remote for it under your username.
   144  
   145    * `git pull-request` [`-o`|`--browse`] [`-f`] [`-m` <MESSAGE>|`-F` <FILE>|`-i` <ISSUE>|<ISSUE-URL>] [`-b` <BASE>] [`-h` <HEAD>]:
   146      Opens a pull request on GitHub for the project that the "origin" remote
   147      points to. The default head of the pull request is the current branch.
   148      Both base and head of the pull request can be explicitly given in one of
   149      the following formats: "branch", "owner:branch", "owner/repo:branch".
   150      This command will abort operation if it detects that the current topic
   151      branch has local commits that are not yet pushed to its upstream branch
   152      on the remote. To skip this check, use `-f`.
   153  
   154      Without <MESSAGE> or <FILE>, a text editor will open in which title and body
   155      of the pull request can be entered in the same manner as git commit message.
   156      Pull request message can also be passed via stdin with `-F -`.
   157  
   158      With `-o` or `--browse`, the new pull request will open in the web browser.
   159  
   160      Issue to pull request conversion via `-i <ISSUE>` or <ISSUE-URL>
   161      arguments is deprecated and will likely be removed from the future versions
   162      of both hub and GitHub API.
   163  
   164    * `git ci-status` [`-v`] [<COMMIT>]:
   165      Looks up the SHA for <COMMIT> in GitHub Status API and displays the latest
   166      status. Exits with one of:  
   167      success (0), error (1), failure (1), pending (2), no status (3)
   168  
   169      If `-v` is given, additionally print the URL to CI build results.
   170  
   171  ## CONFIGURATION
   172  
   173  {{CONFIGS}}
   174  
   175  ## EXAMPLES
   176  
   177  {{README}}
   178  
   179  ## BUGS
   180  
   181  <https://github.com/github/hub/issues>
   182  
   183  ## AUTHORS
   184  
   185  <https://github.com/github/hub/contributors>
   186  
   187  ## SEE ALSO
   188  
   189  git(1), git-clone(1), git-remote(1), git-init(1),
   190  <http://github.com>,
   191  <https://github.com/github/hub>