Reputation: 787
Is there a command a way or a script that can let me export all the ignored git directories and files in my .gitignore file to a folder of my choice preserving the directory structure?
I can get the whole list using this command:
git ls-files -i --exclude-from=[PATH_TO_GITIGNORE_FILE] -o
But I wasn't able to figure out how to do a mass export on a folder of my choice.
Upvotes: 1
Views: 159
Reputation: 14880
You can of course use tar
. Since you generate the list of files already, see this question: How can I build a tar from stdin? on constructing an archive from the file list.
Upvotes: 3