commands.sh

gh browse

all

Open a GitHub repository in the browser or print the URL.

More info →

Options (4)

-s, --settingsboolean

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

Example: gh browse {{[-s|--settings]}}
-w, --wikiboolean

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

Example: gh browse {{[-w|--wiki]}}
-b, --branchboolean

Open a specific branch in the web browser

Example: gh browse {{[-b|--branch]}} {{branch_name}}
-n, --no-browserboolean

Print the destination URL without open the web browser

Example: gh browse {{[-n|--no-browser]}}

Examples (8)

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

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]
made by @shridhargupta | data from tldr-pages