git ls-remote
`git ls-remote` is more general way to get the latest commit. It can be used on any git repo, and supports querying from the default branch using the `HEAD` pseudoref.