Created
April 6, 2017 21:05
-
-
Save jmbarbier/a448d4224eee8e6c3003d3023b1292bc to your computer and use it in GitHub Desktop.
Saving all untracked files from a git repository
This file contains 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
git ls-files --others \ | |
| grep -v .DS_Store \ | |
| grep -v .htaccess \ | |
| grep -v .git \ | |
| tr '\n' '\0' \ | |
| xargs -0 -n1 -I '{}' rsync -aP '{}' user@dest:/tmp/nongit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment