If U is a git URL (e.g., an ssh URL), how can I find the SHA1 hash of a branch or tag of U without a local clone of U?
You can get heads (branches) and tags with git ls-remote U.
git ls-remote U