git open opens the Git repository in the web browser.
Open the root of a repository.
$ git openOpen a specific file or folder of a repository.
$ git open LICENSEOpen a specific commit of a repository.
$ git open 7605d91Open a different repository than cwd.
$ git -C ~/src/my-repo openBy default, three providers github.com, gitlab.com and bitbucket.org are supported.
To add custom Git providers and their URLs, set their values within the global git config.
[open "https://git.mydomain.dev"]
commitprefix = commit
pathprefix = treeThis can also be set using the git CLI.
$ git config --global open.https://git.mydomain.dev.commitprefix commit
$ git config --global open.https://git.mydomain.dev.pathprefix treecommitprefix and pathprefix are used to template the URI for your provider.
fmt.Println(host + "/" + repository + "/" + commitprefix )
// https://git.mydomain.dev/<repository>/commit
fmt.Println(host + "/" + repository + "/" + pathprefix )
// https://git.mydomain.dev/<repository>/treeInstall with brew.
$ brew install arbourd/tap/git-openInstall with go install.
$ go install github.com/arbourd/git-open@latest