Or should I do a git fetch of that branch and then get the revisions corresponding to that branch?
git ls-remote origin master
will get you every ref on on the remote that matches "master", ls-remote is lower level than the ref-naming conventions. Branch refnames are names that start refs/heads/.
You can list any repository's refs directly, try
git ls-remote git://git.kernel.org/pub/scm/git/git.git refs/heads/master
or just leave off the refname pattern for example.
This also works on the current repo, try
git ls-remote .
in the obvious place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With