Skip to content

Instantly share code, notes, and snippets.

@oviniciusfeitosa
Created September 13, 2016 18:04
Show Gist options
  • Save oviniciusfeitosa/0b06072a6a86daf8968eb94b738838a0 to your computer and use it in GitHub Desktop.
Save oviniciusfeitosa/0b06072a6a86daf8968eb94b738838a0 to your computer and use it in GitHub Desktop.
[ GIT ] Export committed files to tar file
Just replace the code below, changing "{COMMIT_ID}" for your commit ID, like "8281a97f653d36da3dc5ed958bbfc87827e2d1d9", for example
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT {COMMIT_ID} | xargs tar -rf mytarfile.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment