Last active
July 24, 2017 09:33
-
-
Save christianruhstaller/eb7f2695f8dba84ec31fda9e3d2e51df to your computer and use it in GitHub Desktop.
Copy files from git
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 diff-tree --no-commit-id --name-only -r HEAD~5..HEAD | while read -r line ; | |
do | |
mkdir -p "/tmp/git/$line"; | |
rmdir "/tmp/git/$line"; | |
cp -r "$line" "/tmp/git/$line"; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment