I'm trying to get the remote name of the giving URL:
$ git ls-remote --get-url
git@github.com:foo/bar.git
$ git remote -v
origin git@github.com:my-username/bar.git (fetch)
origin git@github.com:my-username/bar.git (push)
upstream git@github.com:foo/bar.git (fetch)
upstream git@github.com:foo/bar.git (push)
Is there any way to find the remote name by giving a URL git@github.com:foo/bar.git to determine which remote it belongs to?