I am trying to get a git repo at a specific commit hash without cloning! Every example wants to clone the whole repo. This makes sense but the repo I have in mind is huge and I need this to leave a small footprint as it is going with a docker image.
The commit hash is in the URL - either wget
or curl
could/should recursively fetch but I have a feeling github is blocking that as all I ever get is robots.txt
The repo and commit:
https://github.com/phalcon/cphalcon/tree/1d6d21c98026b5de79ba5e75a3930ce7d1ebcd2e
my best attempt error:
git fetch https://github.com/phalcon/cphalcon/ 1d6d21c98026b5de79ba5e75a3930ce7d1ebcd2e
error: Server does not allow request for unadvertised object 1d6d21c98026b5de79ba5e75a3930ce7d1ebcd2e
update
Suggestions of answers that use clone aren't answering the question. I can clone/checkout no problem. Trying to do it without having the whole repo locally