I have a git repo with a bunch of source code, and when that compiles a bunch of binaries are produced. The binaries are all listed in appropriate .gitignore files, and not included in the repo.
However, I would like to distribute a source+binaries snapshot zipfile of my repo that contains all the binaries, but not things like the .git/ directory.
It would seem like the natural way to create a snapshot zipfile would be
git archive -o archive.zip
But that doesn’t include any of the binaries which are in .gitignore.
Ideas on how I can accomplish this with git archive? (My work-around is to manually create a zip archive that includes everything other than the .git/ directory)
I don’t think you are going to be able to use ‘git archive’ for what you hope to achieve. ‘git archive’ works on commits and your binary files simply won’t be visible. Note ‘git archive’ is so commit centric that you can use git archive directly in a bare repository where no source controlled files exist explicitly.