repo-open
repo-open [-p|--print] [-r|--root] repo-open -h | --helpOpens the web page for the current repository’s origin remote in a
browser (via open-url). Deep-links to the current branch when it exists
on the remote — falling back to the remote’s default branch (main/master)
otherwise — and to the current sub-directory when run below the repo root.
The remote URL is normalized from HTTPS and SSH/scp forms (git@host:owner/repo.git, ssh://…, https://…). The web path layout is provider-specific; the provider is resolved in order:
1. git config browse.provider (per-repo or --global override) 2. Hostname heuristic (github / gitlab / gitea / bitbucket; codeberg → gitea) 3. Default: github-style layoutSelf-hosted hosts the heuristic can’t classify (a Gitea/GitLab instance on a custom domain) need a one-time override:
git config browse.provider gitea
Flags: --print / -p Print the resolved URL instead of opening it. --root / -r Ignore the current sub-directory; link to the repo root. --help / -h Show usage.repo-openrepo-open --printrepo-open --rootTypo abbreviation: open-repo (expands to repo-open on space/enter).