1

In parallel to my source code's git repository I'd like to have a way to access the history of builds as well. Sure enough I could manually create files/directories à la 67b75589ba57b90e83f9b9a121f8c4b61d0ea897.exe (or using a naming system relative to the most recent tag), but that's rather unpleasant. A nice thing to have instead would be a second git repository (yes, I know git is not optimal for binaries, but they are small and one could still have a shallow clone) with the same commit messages but containing only the binaries.

To make clear what I mean, say there's a source file source.c, which compiles into application.exe, and commit 67b75589ba57b90e83f9b9a121f8c4b61d0ea897 of the source repository modifies source.c with a commit message "Fixed issue #5123". Then the parallel repository should as automatically as possible contain a new commit with the new application.exe and a commit message "fixed issue #5123" (maybe additionally referring to the original commit id).

I'd probably implement this via a post-commit hook which runs the compilation (aborting with a warning on failure), extracts the most recent commit id and message and commits the binaries to a separate repository. But maybe you can suggest a better solution - it doesn't have to use git, but the potential support regression testing via git bisect (with pre-compiled binaries for speed-up) would probably outweigh git's suboptimal binary support...

Tobias Kienzler
  • 25,759
  • 22
  • 127
  • 221
  • 1
    That seems easier on GitHub ;) http://stackoverflow.com/a/17440698/6309 – VonC Jul 09 '13 at 07:48
  • Indeed, that's basically what I'd like to achieve. Just offline / at my own server... I'm hoping to hear someone else has tried this before, instead of having to brew up a messy githook... – Tobias Kienzler Jul 09 '13 at 07:50
  • @TobiasKienzler: a) hooks are not messy, they're made exactly these kinds of scenarios ("do something for every commit"), and b) Git is not intended for storing binaries, and storing build artifacts is usually considered unnecessary since you can just build them again from the given revision – Nevik Rehnel Jul 09 '13 at 07:59
  • @NevikRehnel a) Oh I didn't mean to suggest _hooks_ are messy, it's rather the ones that I wrote so far were messy... b) I know git is not perfect for that, but I'd like to have some way to let testers do regression tests without having to provide them with source code, and this way they could at least still `git bisect` – Tobias Kienzler Jul 09 '13 at 08:05

1 Answers1

0

I followed VonC's link and also found this: You create on Github. We distribute for free.