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 form | What it does |
|---|---|
-b, --branch NAME | Open a specific branch |
-c, --commit | Open the last commit |
-n, --no-browser | Print the URL instead of opening it |
-s, --settings | Open the repository settings |
-p, --projects | Open the projects tab |
-w, --wiki | Open the wiki |
Examples
gh browse
gh browse 42
gh browse src/app.js:40
gh browse --no-browser
https://github.com/octocat/Hello-World
gh browse --settings
Notes
- Use --no-browser to get a link to paste into chat or a commit message.
- With a file and --branch, it links to that file on that branch.
- Run it inside a cloned repository, or add -R owner/repo.
See also
Last reviewed 2026-10-09.