Git fetch tagged file without cloning
Concerning these URLs:
git://pe开发者_JAVA技巧rl5.git.perl.org/perl.git
http://perl5.git.perl.org/perl.git/tags
How do I, say, the MANIFEST from perl-5.10.0?
There is no way to grab a single file from a Git repository (using a Git client) right now. However, as noted by Manni, the files can be downloaded using a web client if the repository is exposed that way.
There are patches under development to add a sparse checkout
feature to Git, but it is not yet complete.
See the Git mail list for details. The latest info (that I could find) is here.
If the the server will process git archive requests (it is disabled by default for git daemon, but it seems to be on for git://perl5.git.perl.org
):
git archive --remote=git://perl5.git.perl.org/perl.git --format=tar \
perl-5.10.0 MANIFEST | tar -xOf - >MANIFEST-5.10.0
Direct your browser to http://perl5.git.perl.org/perl.git/blob_plain/HEAD:/MANIFEST.
精彩评论