Skip to content

Instantly share code, notes, and snippets.

@fancyboynet
Created November 5, 2018 09:15
Show Gist options
  • Save fancyboynet/65175ab4da34174438f4ff29520627fd to your computer and use it in GitHub Desktop.
Save fancyboynet/65175ab4da34174438f4ff29520627fd to your computer and use it in GitHub Desktop.
Export files listed by git diff between two commits.
git diff --name-only HEAD^ | xargs tar -zcvf update.zip
@fancyboynet
Copy link
Author

git archive -o update.zip HEAD $(git diff --name-only HEAD^)

@fancyboynet
Copy link
Author

git archive -o update.zip HEAD $(git diff --name-only HEAD^) && unzip update.zip -d update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment