A while ago, I created a shell script called git-url. It prints the remote origin URL of your current git-repository (or exit 1 if no git-repo is found). If the URL is in git: format, it is converted to http: format.

Why would one write this? Because of open `git-url`.

This will open the GitHub- or BitBucket-repository in your favorite browser. I use it all the time!

Above works on macOS. Windows uses start instead of open, but I don’t know how it works with Windows Subsystem for Linux.