cli¶
- class git_web_url.cli.Command[source]¶
git_web_url CLI - Utilities for working with local git repositories.
Usage: gwu <subcommand> [options]
- Subcommands:
url Print the web URL for a file or folder in the git repository. relpath Print the relative path from the git repository root.
- url(path: str | None = None, branch: str | None = None)[source]¶
Print the URL you can one-click to open it in web browser.
- Parameters:
path – the absolute path of the file or folder in your local git repo, if not given, use the current directory.
branch – the branch to use in the URL. - None: use the current branch (default) - “default”: use the default branch (main/master) - other string: use the specified branch name