Skip to content

Instantly share code, notes, and snippets.

@petrenkorf
Created June 6, 2017 20:36
Show Gist options
  • Save petrenkorf/ff87f68aaf79ca49a5539133f62f5b6e to your computer and use it in GitHub Desktop.
Save petrenkorf/ff87f68aaf79ca49a5539133f62f5b6e to your computer and use it in GitHub Desktop.
Export modified files and folder structure of last git commit
#!/bin/bash
git archive -o $(git rev-parse HEAD).zip HEAD $(git diff --name-only HEAD^)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment