I started using git for versioning for binary files (.ai & .indd). I was wondering how I would go about exporting every commit of one of those files (or the whole repo) so that afterwards I would have an image sequence which I could use to make a video like this onemoxie doxy which was made from files being saved as typeface(n), typeface(n++)….
so what I guess I am trying to achieve is something like this:
Git archive -o export iterateOverAllCommits EXPORTS_TO (first commit)archive0001.zip, (second commit)archive0002.zip…
After that it’s no trouble to expand/prepare files for video.
By combining
git archiveandgit rev-listwith a little bash, you can do so.git rev-list --reverse HEADprints out commit hashes starting with the first commit and ending with HEAD.git archive $commit --format=zip -o archive$COUNT.zipcreates a zip archive of the commit specified by the commit hash fromrev-list.Both
rev-listandarchivehave a lot of options, which could help you further refine the archives to contain the information you need only.Using printf you could easily modify the above to zero-pad the count.