This simple tool allows you to get a file git url
❯ git file-url Cargo.toml
https://github.com/nbouliol/git-file-url/blob/master/Cargo.toml
Make sure rustup is installed
Then
git clone https://github.com/nbouliol/git-file-url
cd git-file-url
cargo build --release
The binary will be available in the target/release
directory.
Or if cargo bin path is already added to you env $PATH
git clone https://github.com/nbouliol/git-file-url
cargo install --path git-file-url