1GH-BROWSE(1) GitHub CLI manual GH-BROWSE(1)
2
3
4
6 gh-browse - Open the repository in the browser
7
8
9
11 gh browse [<number> | <path> | <commit-SHA>] [flags]
12
13
14
16 Open the GitHub repository in the web browser.
17
18
19
21 -b, --branch <string>
22 Select another branch by passing in the branch name
23
24
25 -c, --commit <string>
26 Select another commit by passing in the commit SHA, default is
27 the last commit
28
29
30 -n, --no-browser
31 Print destination URL instead of opening the browser
32
33
34 -p, --projects
35 Open repository projects
36
37
38 -r, --releases
39 Open repository releases
40
41
42 -R, --repo <[HOST/]OWNER/REPO>
43 Select another repository using the [HOST/]OWNER/REPO format
44
45
46 -s, --settings
47 Open repository settings
48
49
50 -w, --wiki
51 Open repository wiki
52
53
54
56 $ gh browse
57 #=> Open the home page of the current repository
58
59 $ gh browse 217
60 #=> Open issue or pull request 217
61
62 $ gh browse 77507cd94ccafcf568f8560cfecde965fcfa63
63 #=> Open commit page
64
65 $ gh browse --settings
66 #=> Open repository settings
67
68 $ gh browse main.go:312
69 #=> Open main.go at line 312
70
71 $ gh browse main.go --branch bug-fix
72 #=> Open main.go with the repository at head of bug-fix branch
73
74 $ gh browse main.go --commit=77507cd94ccafcf568f8560cfecde965fcfa63
75 #=> Open main.go with the repository at commit 775007cd
76
77
78
79
80
82 gh(1)
83
84
85
86 Oct 2023 GH-BROWSE(1)