Skip to content

Instantly share code, notes, and snippets.

@williamluisan
Last active April 12, 2022 14:11
Show Gist options
  • Save williamluisan/b8f9c5bcd14fdcee52773151dbf48f4d to your computer and use it in GitHub Desktop.
Save williamluisan/b8f9c5bcd14fdcee52773151dbf48f4d to your computer and use it in GitHub Desktop.
Git compare commit and make archive.
## Archive between tag
git archive -o <app_name>v<version>.zip HEAD $(git diff v<version> v<version> --name-only)
## Archive on specific commit
git archive -o <app_name>v<version>.zip HEAD $(git diff COMMIT~ COMMIT --name-only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment