How to get SHA1 hash from a git repository without cloning? You can get heads (branches) and tags with git ls-remote U.