I have several branches of a git project, with the differences primarily being in configuration files and blobs. I’d like to keep these projects mostly merged and in synch, since developments on one branch need to occur on the other parallel branches as well, but I’m not sure how to go about doing this.
Most git guides and the like I’ve seen don’t really talk about it, and I’m not sure what the best approach is for this sort of problem.
Cherrypicking may be an option, but of course it means someone working on one of those branches loses pretty much the entire history of the various changes. If there’s a way to say “cherrypick everything in this huge project except the files defined in this file” or something, that might still work though. It still seems wrong, somehow.
Sounds like you have one main branch with several sets of configuration files. If you only intend to keep one set of such files in each branch at any point in time, you can maintain one main branch (with all the common files), and commit those config files as a separate commit in each of the other branches. Whenever the main branch gets updated, you will need to rebase the other branches against it, so as to apply their config commits on top of the latest changes.
becomes
or even