What kind of read-only operations are possible on a remote git repository using the standard git command line tool without having a local clone?
I guess that doing this without a local clone might involve some low level primitive operations, and I guess that making this usable might best be accomplished by some short shell script. That would still be within the scope of this question.
Is there some way to list refs (in particular tags and branches) on the remote repo?
Yes, that is what git ls-remote does.
Is there a way to list the content of a given directory in a given revision?
Is it possible to retrieve the content of a given file at a given revision?
2012: However, beside getting branches and tags, I don't think you can get the content without cloning (full clone or sparse checkout or shallow clone).And you cannot do a shallow clone for a specific commit or tag, or for a specific branch.
Update 2016:
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