Skip to content

Instantly share code, notes, and snippets.

@PawelGIX
Last active August 29, 2015 14:23
Show Gist options
  • Save PawelGIX/e5d67f674d6c506e24d6 to your computer and use it in GitHub Desktop.
Save PawelGIX/e5d67f674d6c506e24d6 to your computer and use it in GitHub Desktop.
GIT Export from changed files from INPUT commit to HEAD
#!/bin/bash
# Export from changed files from INPUT commit to HEAD
# INPUT : commit hash
INPUT=$1
echo "Export from commit $INPUT"
git archive -o ../update.zip HEAD $(git diff --name-only $INPUT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment