Reputation: 9418
Is there a command (something like git remote show maybe) that will get me an up to date remote branch commit hash without updating references by fetching?
Upvotes: 1
Views: 63
Reputation: 2137
You can use
git ls-remote <URL> <BRANCH>
and you will get following output:
λ git ls-remote https://github.com/rogerwang/node-webkit.git master
b5d2137d95d861ede02188dcbc7cdc459562d706 refs/heads/master
see help page: https://www.kernel.org/pub/software/scm/git/docs/git-ls-remote.html
Upvotes: 2