gh browse Open the repository, an issue or a file in your browser

Opens the GitHub page for the current repository, or for a file, branch, issue or pull request, so you can jump from the terminal to the web.

Synopsis

gh browse [NUMBER | PATH | COMMIT] [FLAGS]

Common options

Option or formWhat it does
-b, --branch NAMEOpen a specific branch
-c, --commitOpen the last commit
-n, --no-browserPrint the URL instead of opening it
-s, --settingsOpen the repository settings
-p, --projectsOpen the projects tab
-w, --wikiOpen the wiki

Examples

Open this repository
gh browse
Open an issue or pull request by number
gh browse 42
Open a file at a line
gh browse src/app.js:40
Just print the link
gh browse --no-browser
https://github.com/octocat/Hello-World
Open settings
gh browse --settings

Notes

See also

Last reviewed 2026-10-09.