-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathgh.1
556 lines (498 loc) · 18.3 KB
/
gh.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GH" "1" "January 2014" "GITHUB" "gh Manual"
.
.SH "NAME"
\fBgh\fR \- gh + h = github
.
.SH "SYNOPSIS"
\fBgh\fR [\fB\-\-noop\fR] \fICOMMAND\fR \fIOPTIONS\fR
.
.br
\fBgh alias\fR [\fB\-s\fR] [\fISHELL\fR]
.
.SS "Expanded git commands:"
\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 remote set\-url\fR [\fB\-p\fR] \fIOPTIONS\fR \fIREMOTE\-NAME\fR \fIUSER\fR[/\fIREPOSITORY\fR]
.
.br
\fBgit fetch\fR \fIUSER\-1\fR,[\fIUSER\-2\fR,\.\.\.]
.
.br
\fBgit checkout\fR \fIPULLREQ\-URL\fR [\fIBRANCH\fR]
.
.br
\fBgit merge\fR \fIPULLREQ\-URL\fR
.
.br
\fBgit cherry\-pick\fR \fIGITHUB\-REF\fR
.
.br
\fBgit am\fR \fIGITHUB\-URL\fR
.
.br
\fBgit apply\fR \fIGITHUB\-URL\fR
.
.br
\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 fork\fR [\fB\-\-no\-remote\fR]
.
.br
\fBgit pull\-request\fR [\fB\-f\fR] [\fB\-m\fR \fIMESSAGE\fR|\fB\-F\fR \fIFILE\fR|\fB\-i\fR \fIISSUE\fR|\fIISSUE\-URL\fR] [\fB\-b\fR \fIBASE\fR] [\fB\-h\fR \fIHEAD\fR]
.
.br
\fBgit release create\fR [\fB\-d\fR] [\fB\-p\fR] [\fB\-a\fR \fIASSETS\-DIR\fR] [\fB\-m\fR \fIMESSAGE\fR|\fB\-f\fR \fIFILE\fR] \fITAG\fR \fBgit issue create\fR [\fB\-m\fR \fIMESSAGE\fR|\fB\-f\fR \fIFILE\fR] [\fB\-l\fR \fILABEL\-1\fR,\fILABEL\-2\fR,\.\.\.,\fILABEL\-N\fR] \fBgit ci\-status\fR [\fB\-v\fR] [\fICOMMIT\fR]
.
.SH "DESCRIPTION"
gh enhances various git commands to ease most common workflows with GitHub\.
.
.TP
\fBgh \-\-noop\fR \fICOMMAND\fR
Shows which command(s) would be run as a result of the current command\. Doesn\'t perform anything\.
.
.TP
\fBgh alias\fR [\fB\-s\fR] [\fISHELL\fR]
Shows shell instructions for wrapping git\. If given, \fISHELL\fR specifies the type of shell; otherwise defaults to the value of SHELL environment variable\. With \fB\-s\fR, outputs shell script suitable for \fBeval\fR\.
.
.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\.
.
.IP
If the repository is private or the current user has push access to the repository, gh will use the ssh protocol for cloning\. Use \fB\-p\fR to select the ssh protocol unconditionally\. HTTPS protocol can be used instead by setting "gh\.protocol" (see \fICONFIGURATION\fR)\.
.
.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 remote set\-url\fR [\fB\-p\fR] \fIOPTIONS\fR \fIREMOTE\-NAME\fR \fIUSER\fR[/\fIREPOSITORY\fR]
Sets the url of remote \fIREMOTE\-NAME\fR using the same rules as \fBgit remote add\fR\.
.
.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\.
.
.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\.
.
.TP
\fBgit merge\fR \fIPULLREQ\-URL\fR
Merge the pull request with a commit message that includes the pull request ID and title, similar to the GitHub Merge Button\.
.
.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\.
.
.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\.
.
.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 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 help\fR
Display enhanced git\-help(1)\.
.
.P
gh also adds some custom commands that are otherwise not present in git:
.
.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\.
.
.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")\. With \fB\-u\fR, outputs the URL rather than opening the browser\.
.
.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")\. If \fIEND\fR is omitted, GitHub compare view is opened for the current branch\. With \fB\-u\fR, outputs the URL rather than opening the browser\.
.
.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\.
.
.TP
\fBgit pull\-request\fR [\fB\-f\fR] [\fB\-m\fR \fIMESSAGE\fR|\fB\-F\fR \fIFILE\fR|\fB\-i\fR \fIISSUE\fR|\fIISSUE\-URL\fR] [\fB\-b\fR \fIBASE\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
Without \fIMESSAGE\fR or \fIFILE\fR, 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\. Pull request message can also be passed via stdin with \fB\-F \-\fR\.
.
.IP
Issue to pull request conversion via \fB\-i <ISSUE>\fR or \fIISSUE\-URL\fR arguments is deprecated and will likely be removed from the future versions of both hub and GitHub API\.
.
.TP
\fBgit release\fR
Retrieves releases from GitHub for the project that the "origin" remote points to\.
.
.TP
\fBgit release create\fR [\fB\-d\fR] [\fB\-p\fR] [\fB\-a\fR \fIASSETS\-DIR\fR] [\fB\-m\fR \fIMESSAGE\fR|\fB\-f\fR \fIFILE\fR] \fITAG\fR
Creates a new release in GitHub for the project that the "origin" remote points to\. It requires the name of the tag to release as a first argument\.
.
.IP
Specify the assets to include in the release from a directory via \fB\-a\fR\. Without \fB\-a\fR, it finds assets from "releases/TAG" of the current directory\.
.
.IP
Without \fIMESSAGE\fR or \fIFILE\fR, a text editor will open in which title and body of the release can be entered in the same manner as git commit message\.
.
.IP
If \fB\-d\fR is given, it creates a draft release\.
.
.IP
If \fB\-p\fR is given, it creates a pre\-release\.
.
.TP
\fBgit issue\fR
List summary of the open issues for the project that the "origin" remote points to\.
.
.TP
\fBgit issue create\fR [\fB\-m\fR \fIMESSAGE\fR|\fB\-f\fR \fIFILE\fR] [\fB\-l\fR \fILABEL\-1\fR,\fILABEL\-2\fR,\.\.\.,\fILABEL\-N\fR]
Creates an issue for the project that the "origin" remote points to\.
.
.IP
Without \fIMESSAGE\fR or \fIFILE\fR, a text editor will open in which title and body of the release can be entered in the same manner as git commit message\.
.
.IP
Specify one or more labels via \fB\-a\fR\.
.
.TP
\fBgit ci\-status\fR [\fB\-v\fR] [\fICOMMIT\fR]
Looks up the SHA for \fICOMMIT\fR in GitHub Status API and displays the latest status\. Exits with one of:
.
.br
success (0), error (1), failure (1), pending (2), no status (3)
.
.IP
If \fB\-v\fR is given, additionally print the URL to CI build results\.
.
.SH "CONFIGURATION"
gh will prompt for GitHub username & password the first time it needs to access the API and exchange it for an OAuth token, which it saves in "~/\.config/gh"\.
.
.P
To avoid being prompted, use \fIGITHUB_USER\fR and \fIGITHUB_PASSWORD\fR environment variables\.
.
.P
If you prefer the HTTPS protocol for GitHub repositories, you can set "gh\.protocol" to "https"\. This will affect \fBclone\fR, \fBfork\fR, \fBremote add\fR and other operations that expand references to GitHub repositories as full URLs that otherwise use git and ssh protocols\.
.
.IP "" 4
.
.nf
$ git config \-\-global gh\.protocol https
.
.fi
.
.IP "" 0
.
.SS "GitHub Enterprise"
By default, gh will only work with repositories that have remotes which point to github\.com\. GitHub Enterprise hosts need to be whitelisted to configure hub to treat such remotes same as github\.com:
.
.IP "" 4
.
.nf
$ git config \-\-global \-\-add gh\.host my\.git\.org
.
.fi
.
.IP "" 0
.
.P
The default host for commands like \fBinit\fR and \fBclone\fR is still github\.com, but this can be affected with the \fIGITHUB_HOST\fR environment variable:
.
.IP "" 4
.
.nf
$ GITHUB_HOST=my\.git\.org git clone myproject
.
.fi
.
.IP "" 0
.
.SH "EXAMPLES"
.
.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
$ git push origin
> git push origin HEAD
.
.fi
.
.SS "git checkout"
.
.nf
$ git checkout https://github\.com/jingweno/gh/pull/35
> git remote add \-f \-t feature git://github:com/foo/gh\.git
> git checkout \-\-track \-B foo\-feature foo/feature
$ git checkout https://github\.com/jingweno/gh/pull/35 custom\-branch\-name
.
.fi
.
.SS "git merge"
.
.nf
$ git merge https://github\.com/jingweno/gh/pull/73
> git fetch git://github\.com/jingweno/gh\.git +refs/heads/feature:refs/remotes/jingweno/feature
> git merge jingweno/feature \-\-no\-ff \-m \'Merge pull request #73 from jingweno/feature\.\.\.\'
.
.fi
.
.SS "git clone"
.
.nf
$ git clone jingweno/gh
> git clone git://github\.com/jingweno/gh
$ git clone \-p jingweno/gh
> git clone git@github\.com:jingweno/gh\.git
$ git clone jekyll_and_hype
> git clone git://github\.com/YOUR_LOGIN/jekyll_and_hype\.
$ git clone \-p jekyll_and_hype
> git clone git@github\.com:YOUR_LOGIN/jekyll_and_hype\.git
.
.fi
.
.SS "git fetch"
.
.nf
$ git fetch jingweno
> git remote add jingweno git://github\.com/jingweno/REPO\.git
> git fetch jingweno
$ git fetch jingweno,foo
> git remote add jingweno \.\.\.
> git remote add foo \.\.\.
> git fetch \-\-multiple jingweno foo
$ git fetch \-\-multiple jingweno foo
> git remote add jingweno \.\.\.
> git remote add foo \.\.\.
> git fetch \-\-multiple jingweno foo
.
.fi
.
.SS "git cherry\-pick"
.
.nf
$ git cherry\-pick https://github\.com/jingweno/gh/commit/a319d88#comments
> git remote add \-f jingweno git://github\.com/jingweno/gh\.git
> git cherry\-pick a319d88
$ git cherry\-pick jingweno@a319d88
> git remote add \-f jingweno git://github\.com/jingweno/gh\.git
> git cherry\-pick a319d88
$ git cherry\-pick jingweno@SHA
> git fetch jingweno
> git cherry\-pick SHA
.
.fi
.
.SS "git remote"
.
.nf
$ git remote add jingweno
> git remote add \-f jingweno git://github\.com/jingweno/CURRENT_REPO\.git
$ git remote add \-p jingweno
> git remote add \-f jingweno git@github\.com:jingweno/CURRENT_REPO\.git
$ git remote add origin
> git remote add \-f YOUR_USER git://github\.com/YOUR_USER/CURRENT_REPO\.git
.
.fi
.
.SS "git submodule"
.
.nf
$ git submodule add jingweno/gh vendor/gh
> git submodule add git://github\.com/jingweno/gh\.git vendor/gh
$ git submodule add \-p jingweno/gh vendor/gh
> git submodule add git@github\.com:jingweno/gh\.git vendor/gh
$ git submodule add \-b gh \-\-name gh jingweno/gh vendor/gh
> git submodule add \-b gh \-\-name gh git://github\.com/jingweno/gh\.git vendor/gh
.
.fi
.
.SS "git pull\-request"
.
.nf
# while on a topic branch called "feature":
$ git pull\-request
[ opens text editor to edit title & body for the request ]
[ opened pull request on GitHub for "YOUR_USER:feature" ]
# explicit pull base & head:
$ git pull\-request \-b jingweno:master \-h jingweno:feature
$ git pull\-request \-m "title\en\enbody"
[ create pull request with title & body ]
$ git pull\-request \-i 123
[ attached pull request to issue #123 ]
$ git pull\-request https://github\.com/jingweno/gh/pull/123
[ attached pull request to issue #123 ]
$ git pull\-request \-F FILE
[ create pull request with title & body from FILE ]
.
.fi
.
.SS "git apply"
.
.nf
$ git apply https://github\.com/jingweno/gh/pull/55
> curl https://github\.com/jingweno/gh/pull/55\.patch \-o /tmp/55\.patch
> git apply /tmp/55\.patch
$ git apply \-\-ignore\-whitespace https://github\.com/jingweno/gh/commit/fdb9921
> curl https://github\.com/jingweno/gh/commit/fdb9921\.patch \-o /tmp/fdb9921\.patch
> git apply \-\-ignore\-whitespace /tmp/fdb9921\.patch
$ git apply https://gist\.github\.com/8da7fb575debd88c54cf
> curl https://gist\.github\.com/8da7fb575debd88c54cf\.txt \-o /tmp/gist\-8da7fb575debd88c54cf\.txt
> git apply /tmp/gist\-8da7fb575debd88c54cf\.txt
.
.fi
.
.SS "git fork"
.
.nf
$ git fork
[ repo forked on GitHub ]
> git remote add \-f YOUR_USER git@github\.com:YOUR_USER/CURRENT_REPO\.git
$ git fork \-\-no\-remote
[ repo forked on GitHub ]
.
.fi
.
.SS "git create"
.
.nf
$ git create
\.\.\. create repo on github \.\.\.
> git remote add \-f origin git@github\.com:YOUR_USER/CURRENT_REPO\.git
# with description:
$ git create \-d \'It shall be mine, all mine!\'
$ git create recipes
[ repo created on GitHub ]
> git remote add origin git@github\.com:YOUR_USER/recipes\.git
$ git create sinatra/recipes
[ repo created in GitHub organization ]
> git remote add origin git@github\.com:sinatra/recipes\.git
.
.fi
.
.SS "git ci\-status"
.
.nf
$ git ci\-status
> (prints CI state of HEAD and exits with appropriate code)
> One of: success (0), error (1), failure (1), pending (2), no status (3)
$ git ci\-status \-v
> (prints CI state of HEAD, the URL to the CI build results and exits with appropriate code)
> One of: success (0), error (1), failure (1), pending (2), no status (3)
$ git ci\-status BRANCH
> (prints CI state of BRANCH and exits with appropriate code)
> One of: success (0), error (1), failure (1), pending (2), no status (3)
$ git ci\-status SHA
> (prints CI state of SHA and exits with appropriate code)
> One of: success (0), error (1), failure (1), pending (2), no status (3)
.
.fi
.
.SS "git browse"
.
.nf
$ git browse
> open https://github\.com/YOUR_USER/CURRENT_REPO
$ git browse commit/SHA
> open https://github\.com/YOUR_USER/CURRENT_REPO/commit/SHA
$ git browse issues
> open https://github\.com/YOUR_USER/CURRENT_REPO/issues
$ git browse \-p jingweno/gh
> open https://github\.com/jingweno/gh
$ git browse \-p jingweno/gh commit/SHA
> open https://github\.com/jingweno/gh/commit/SHA
$ git browse \-p resque
> open https://github\.com/YOUR_USER/resque
$ git browse \-p resque network
> open https://github\.com/YOUR_USER/resque/network
.
.fi
.
.SS "git compare"
.
.nf
$ git compare refactor
> open https://github\.com/CURRENT_REPO/compare/refactor
$ git compare 1\.0\.\.1\.1
> open https://github\.com/CURRENT_REPO/compare/1\.0\.\.\.1\.1
$ git compare \-u other\-user patch
> open https://github\.com/other\-user/REPO/compare/patch
.
.fi
.
.SS "git release (beta)"
.
.nf
$ git release
> (prints a list of releases of YOUR_USER/CURRENT_REPO)
$ git release TAG
> (creates a new release for the given tag)
.
.fi
.
.SS "git issues (beta)"
.
.nf
$ git issue
> (prints a list of issues for YOUR_USER/CURRENT_REPO)
$ git issue create
> (creates an issue for the project that "origin" remte points to)
.
.fi
.
.SH "BUGS"
\fIhttps://github\.com/github/gh/issues\fR
.
.SH "AUTHORS"
\fIhttps://github\.com/github/gh/contributors\fR
.
.SH "SEE ALSO"
git(1), git\-clone(1), git\-remote(1), git\-init(1), \fIhttp://github\.com\fR, \fIhttps://github\.com/github/hub\fR