How is it possible to export all commits into ZIP files (containing all files, not only patch/diff):
myproject-commit1-67d91ab.zip
myproject-commit2-9283acd.zip
myproject-commit3-c57daa6.zip
...
or into directories:
myproject-commit1-67d91ab/
myproject-commit2-9283acd/
myproject-commit3-c57daa6/
?
I was thinking about commands like:
git archive --format zip --output myproject-commit3.zip c57daa6
from How do I export a specific commit with git-archive?, but how to get all commits?
Notes:
the goal is to do an export of all files of each commit, so that I can have access to them even if I don't have
git
on the machinethe answer from How can I export Git change sets from one repository to another via sneaker net (external files)? creates a
.bundle
file, but it seems impossible to access it withoutgit
, so it's not what I'm looking forthis nearly works:
for ((i = 0;; ++i)); do git checkout master~$i || break; tar czf ../myproject-commit$i.tgz .; done
but it also archives all the files in the current directory which are not
git add
ed to the repo... How to avoid this problem?