← 返回命令列表

Linux command

git-browse 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Open repository in browser

git browse

Open specific commit

git browse [commit]

Open specific branch

git browse --branch [name]

Open issues page

git browse --issues

Print URL without opening

git browse -u

说明

git browse is a git-extras command that automatically detects your repository's remote URL and opens it in your default web browser. It intelligently handles GitHub, GitLab, and Bitbucket repositories, constructing the appropriate web URLs. The command can navigate directly to specific commits, branches, or repository sections like the issues page. This eliminates the need to manually type or copy repository URLs when you want to view code on the hosting platform. The --url option allows scripting and automation by printing the URL instead of opening it, useful for integration with other tools or workflows.

参数

--branch _name_
Open specific branch.
--issues
Open issues page.
-u, --url
Print URL only.

FAQ

What is the git-browse command used for?

git browse is a git-extras command that automatically detects your repository's remote URL and opens it in your default web browser. It intelligently handles GitHub, GitLab, and Bitbucket repositories, constructing the appropriate web URLs. The command can navigate directly to specific commits, branches, or repository sections like the issues page. This eliminates the need to manually type or copy repository URLs when you want to view code on the hosting platform. The --url option allows scripting and automation by printing the URL instead of opening it, useful for integration with other tools or workflows.

How do I run a basic git-browse example?

Run `git browse` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --branch _name_ do in git-browse?

Open specific branch.