Hacker Newsnew | comments | show | ask | jobs | submit login
Ask HN: Binary File Locking solution that works well with Git?
4 points by gte910h 1806 days ago | 1 comment
Is there a script or binary file locking solution which works with git?

Yes, I understand "that goes against the ideas of distribution!", but yet, it goes with exactly what's needed for some projects, and I'm interested if there is a reasonable way to manage binary assets alongside or nearly alongside code in a git repository. The binary assets don't have to "be in" the git repo, but they do have to end up in the same source tree.

Don't think "small art", think "Huge 3d models, long pdfs, etc".

And yes, I am aware of the solutions which just "generate these from text*.

I am not looking for those. I'm looking for solutions which neatly lock the files yet is integrated with git.

Additionally, I'm looking for something technical, not something merely communication based (i.e. emails stating don't touch X).




When working from a single office, I have in the past defined a shared area as a nominated "binary repository".

The rules for the binary repository are that everything is versioned by filename and so a given file never changes - if you need to change a file you copy it and give it a new filename. Then you don't need locks. The versioned build script in the git repository finds the binary repository from an environment variable. This way old revisions in the git repository that depend on old binaries still work, but there is full visibility to delete old versions in the binary repository to free up space as required.

I used this kind of arrangement for things like upstream tarballs which changed relatively infrequently. I'm not sure how well this would work for you though.

One thing I think you might want is the ability to rebuild any revision out of your repository. Any revision control system achieves this, but if your build depends on binaries that aren't "in" the git repo, then how would this work?

If you still want some way of locking binaries, then there is an immediate question: how and when are files locked and unlocked? Manually (like SourceSafe)? Automatically on file open?

I would reconsider whether you want the binaries in the source tree or just running parallel alongside it. If they're not managed by git, then being in the source tree would cause confusion, wouldn't it?

For manually locked binaries, you might find a suitable WebDAV server useful, perhaps? The protocol supports locks. Maybe something built on git hooks and WebDAV with a central binary repository will work for you.

For automatically locked binaries available and modifiable across multiple offices, take a look at Synctus (my product). I'm not clear if this would be useful to you though.

-----




Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: