Git Me The URL is a Python library and command-line tool (CLI) designed to generate sharable links to your Git source code. It currently supports popular Git hosting platforms such as GitHub, GitLab, and Bitbucket. The project, currently at version 2.2.0, maintains an active development status with releases typically focusing on dependency updates, minor enhancements, or internal improvements, including a significant architectural rewrite in version 2.0.0.
pip install git-me-the-urlVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `GitMeTheURL` object and generate a shareable URL for a file within a local Git repository. The library automatically detects the repository and its remote origin.
Review the 'Rewrote implementation of translators' section in the release notes for v2.0.0 and update any custom URL generation logic or plugins accordingly.
Upgrade to `git-me-the-url` version 2.1.0 or higher, which explicitly removed the `pkg_resources` dependency. Ensure your `setuptools` version is compatible if you cannot upgrade the library.
Install Git on your operating system and ensure it's added to your system's PATH environment variable. Verify installation with `git --version` in your terminal.
Ensure the package is installed: `pip install git-me-the-url`. Check that the import is `from gitmetheurl import GitMeTheURL`.
Navigate to the root of your Git repository before running the command, or ensure that the path passed to `get_source_url` is within a valid Git repository.
Upgrade `git-me-the-url` to version 2.1.0 or newer: `pip install --upgrade git-me-the-url`. If unable to upgrade, you might need to pin an older `setuptools` version, though this is not recommended.