Extract single file or folder

You know the problem when trying to get just one file or folder out of your GIT repository? For example if you had a repository for all your Magento modules you’ve written, you might  want to extract only one of them to a new project. Sure  you can use subtree but sometimes you only want to get a certain version or just don’t need the GIT – stuff. In these cases you can use

$> # git archive --remote=   | tar xvf -
$> git archive --remote='git@bitbucket.org:sheldon/ask-sheldon.com.git' master path/to/file/or/folder/in/repo | tar xvf -

to get the required files or folders out of the repository.

Further information about Extract single file or folder:

1 thoughts on “Extract single file or folder

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.