Bash script to iterate all commits of a given Git repository and extract all files within each commit.
With a Git repository at /path/to/repository and an empty directory at /path/to/output we can run:
./export.sh /path/to/repository /path/to/output