Skip to content

Instantly share code, notes, and snippets.

@fracarma
Created September 21, 2022 12:01
Show Gist options
  • Save fracarma/33005f2b0acc0ea0eaf65ccd0c38a7bc to your computer and use it in GitHub Desktop.
Save fracarma/33005f2b0acc0ea0eaf65ccd0c38a7bc to your computer and use it in GitHub Desktop.
Copy every modified file by a commit
export DIFF_FILES=$(git diff-tree --no-commit-id --name-only -r fab52c70433764eb16f654d65454bb1af26bca20)
echo $DIFF_FILES | cpio -pvdumB target-folder/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment