so I started out with what @hvd said:
git ls-remote REPOLINK TAG
but that gave me only the tag hash, and I want the commit hash.
so I went back to:
git ls-remote REPOLINK
and decided to grep for the tag:
git ls-remote REPOLINK | grep TAG
so now I have 2 rows, the first with the tag hash, and the 2nd with commit hash. so first we need to take just the second line:
git ls-remote REPOLINK | grep TAG | sed -n 2p
and we now have:
HASH TAG
now lets cut off everything but the first column to get the hash:
git ls-remote REPOLINK | grep TAG | sed -n 2p | cut -f1