Last active
April 3, 2023 08:42
-
-
Save hgc81538/80ee192be3c1534aad38714eb981c9a7 to your computer and use it in GitHub Desktop.
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
# 1 commit | |
cp --parents `git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id` ../output | |
# between commits | |
cp --parents `git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $commit_id_start $commit_id_end` ../output | |
# reference | |
https://stackoverflow.com/questions/4541300/export-only-modified-and-added-files-with-folder-structure-in-git | |
https://stackoverflow.com/questions/29300910/how-to-send-output-of-ls-l-to-cp-command-using-pipes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment