git show list of all files changed between two commits & zip them

To show a list of the files changed between git commits, do the following:

$ git diff --name-only SHA1 SHA2

To also, zip the resulting files, pipe the response to `xargs' and `zip' as such:

$ git diff --name-only SHA1 SHA2 | xargs zip /path/to/
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment