Retrieve single file from remote repository

2012-05-04

If you want to retrieve a single file from a specific repository without cloning or checking out anything, you can do this:

git archive --remote git@bitbucket.org:myusername/myrepo.git HEAD file-to-retrieve.rb | tar -x

Leave a Reply

Twitter: @mikeplate