HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gh browse — Open a GitHub repository in the browser or print the URL. More information: <https://cli.github.com/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandgh browsebrowsergithubcliopenrepository

Problem

How to use the gh browse command: Open a GitHub repository in the browser or print the URL. More information: <https://cli.github.com/manual/gh_browse>.

Solution

gh browse — Open a GitHub repository in the browser or print the URL. More information: <https://cli.github.com/manual/gh_browse>.

Open the homepage of the current repository in the default web browser:
gh browse


Open the homepage of a specific repository in the default web browser:
gh browse {{owner}}/{{repository}}


Open the settings page of the current repository in the default web browser:
gh browse {{[-s|--settings]}}


Open the wiki of the current repository in the default web browser:
gh browse {{[-w|--wiki]}}


Open a specific issue or pull request in the web browser:
gh browse {{issue_number|pull_request_number}}


Open a specific branch in the web browser:
gh browse {{[-b|--branch]}} {{branch_name}}


Open a specific file or directory of the current repository in the web browser:
gh browse {{path/to/file_or_directory}}


Print the destination URL without open the web browser:
gh browse {{[-n|--no-browser]}}

Code Snippets

Open the homepage of the current repository in the default web browser

gh browse

Open the homepage of a specific repository in the default web browser

gh browse {{owner}}/{{repository}}

Open the settings page of the current repository in the default web browser

gh browse {{[-s|--settings]}}

Open the wiki of the current repository in the default web browser

gh browse {{[-w|--wiki]}}

Open a specific issue or pull request in the web browser

gh browse {{issue_number|pull_request_number}}

Context

tldr-pages: common/gh browse

Revisions (0)

No revisions yet.