Tip
Русская версия: README-RU.md
Note
gitow - git open web. A Rust CLI focused on opening repository web pages from the current working tree. It offers:
- Repository navigation - Open repository roots, branches, commits, issues, pull requests, commit history, releases, tracked files, and custom URL suffixes.
- Remote resolution - Resolve Git remote names, literal remote URLs,
insteadOfrewrites, and SSH config aliases. - Branch-aware links - Pick the upstream branch, current branch, exact tag, or current commit SHA depending on repository state.
- Multi-remote workflow - Open every configured remote with
--all-remotes, keepingoriginfirst. - Script-friendly output - Print generated URLs with
--printorBROWSER=echowithout launching a browser. - Short command surface - Use one compact
gitowbinary for every navigation target.
Important
- Git
- Rust 1.95 or newer
- Platform browser launcher or a
BROWSERcommand
cargo install gitowThis installs the latest published release from crates.io into your Cargo bin directory.
git clone https://github.com/WhoSowSee/gitow.git
cd gitow
cargo install --path .The command above builds gitow and places the binary into the Cargo bin directory, usually ~/.cargo/bin.
cargo build --release
./target/release/gitow --printRun the binary through Cargo with:
cargo run --bin gitow -- --printgitow [OPTIONS] [REMOTE_OR_URL] [BRANCH]
Examples:
gitow
gitow upstream
gitow upstream feature/my-branch
gitow git@github.com:owner/repo.git
gitow https://gitlab.example.com/group/project.git main
gitow --print-c, --commit- opens the current commit in the forge UI.-i, --issue- opens the issue inferred from the current branch name.-m, --pull-requests- opens the pull requests or merge requests page.-C, --commits- opens the commits page for the selected branch or ref.-r, --releases- opens the releases page where the forge supports it.-a, --all-remotes- opens every configured remote.-f, --file <PATH>- opens a repository-relative tracked file.-s, --suffix <SUFFIX>- appends an arbitrary suffix to the generated URL.-p, --print- prints the URL instead of launching a browser.-h, --help- shows the help text.
gitow --commit
gitow --issue
gitow --pull-requests
gitow --commits
gitow --releases
gitow --all-remotes
gitow --file src/main.rs
gitow --suffix actions
gitow --printBy default, gitow opens:
open.default.remote, if configured.- The current branch's tracked remote, if configured.
origin.
For the ref, it uses the selected branch's upstream branch when available, otherwise the current branch. In detached HEAD state, it falls back to an exact tag and then to the current commit SHA.
gitow detects URL layouts for:
- GitHub
- GitHub Gist
- GitLab.com and self-hosted GitLab instances
- Gitea, Forgejo, Gogs, and Codeberg
- Bitbucket Cloud
- Bitbucket Server / Atlassian Stash
- Azure DevOps / Visual Studio Team Services / Team Foundation Server
- AWS CodeCommit
- generic Git hosting URLs
Some pages are forge-specific. Releases are supported for GitHub, GitLab, and Gitea-compatible forges. AWS CodeCommit does not support the issue shortcut.
gitow uses normal Git configuration. Add --global to apply an option to all repositories.
Set the remote that should be opened when no remote argument is provided:
git config open.default.remote upstreamIf the Git remote host differs from the web UI host, configure URL-matched overrides:
git config "open.https://git.example.com.domain" "repo.intranet/subpath"
git config "open.https://git.example.com.protocol" "http"For example, a remote like:
ssh://git@git.example.com:7000/team/repo.git
can open as:
http://repo.intranet/subpath/team/repo
Gitea-compatible forges use a different branch URL layout. Codeberg and domains containing gitea, forgejo, or gogs are detected automatically. For custom domains, configure the forge type explicitly:
git config "open.https://git.internal.example.forge" "gitea"Accepted values gitea, forgejo, and gogs are normalized to gitea.
SCP-style remotes can be resolved through SSH config aliases:
Host work
HostName git.internal.example
git remote set-url origin work:team/repo.git
gitow --print
# prints https://git.internal.example/team/repoThe tool reads the path from the GITOW_SSH_CONFIG environment variable first, then falls back to $HOME/.ssh/config when it exists.
By default, gitow uses the platform browser launcher:
- Windows:
cmd /C start - macOS:
open - Linux:
xdg-open - WSL: Windows PowerShell
Start
Set BROWSER to use a specific browser command:
BROWSER=firefox gitowUse --print or BROWSER=echo to inspect generated URLs without opening a browser:
gitow --print
BROWSER=echo gitowcargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
© 2026-present WhoSowSee
