Last active
October 16, 2018 11:13
-
-
Save technocake/f2d9411d98f4f034e4a301f26462be22 to your computer and use it in GitHub Desktop.
Copy all ignored files from a git repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copy all ignored files from a git repo to $FOLDER | |
FOLDER= "/path/to/folder" | |
for file in $(git ls-files --others -i --exclude-standard); do | |
cp --parents "$file" "$FOLDER" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment