I was hoping you folks could recommend a “best practice” for source controlling binary assets for a Rails site in git.
My main concern is that as we work on the site, constantly adding and removing 500kb+ images from our git repo, the repo will eventually get pretty fat and unwieldy and we’ll either have to manually remove those images from history (prone to disaster, as far as I can tell) or put up with a long initial download and extra wasted space on disk.
What are some alternatives for separating the app’s logic from the assets? Git submodules? Anything else?
Thanks!
It seems this is pretty well covered elsewhere on SO and elsewhere. A start (after 5 seconds of searching):
If you’re really seeing bloat in your repo and are wanting to keep the main rails app repo free of this, you can look into git submodules – all changes to the images would be kept within a separate
assets(for example) repo, keeping your main repo free of incurred bloat.