Skip to content

Instantly share code, notes, and snippets.

@pnmcosta
Created June 5, 2018 18:15
Show Gist options
  • Save pnmcosta/8273513c0aadb6264eff01732180a749 to your computer and use it in GitHub Desktop.
Save pnmcosta/8273513c0aadb6264eff01732180a749 to your computer and use it in GitHub Desktop.
Git commands to create archives of diff's
# START Create Archives
# Author: Pedro Maia Costa <[email protected]>
# Note: Please see Gist first comment, replace $var-name below with your values before running.
# Create an archive of the entire current branch
git archive -o ..\deploys\full.zip HEAD
# Create a diff of the files that are different between commits
git diff --no-commit-id --name-only --diff-filter=ACMRT $commitid > ../deploys/diff_$commitid.txt
# Create a diff of the files that are different between current branch and $another
git diff --no-commit-id --name-only --diff-filter=ACMRT HEAD $another > ../deploys/diff_$another.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment