Created
August 24, 2016 06:42
-
-
Save yang-qu/709cb361c88d6237ec1f5cbe9b80c984 to your computer and use it in GitHub Desktop.
Archive changed files between two commits in a git repository
This file contains hidden or 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
| # Get changed(added or modified) files list to a text file. | |
| git diff --name-only --diff-filter=AM <commit1>..<commit2> > changes.txt | |
| # Create 7z archive. On windows git bash, this can also deal with file names with spaces. | |
| 7z a changes.7z -ir@"changes.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment