Hi HN!<p>I'm working on an online course that currently has four chapters. The students need to be able to start the project from any chapters they want.<p>Ideally, I should be able to provide partial/full solutions as a repository (or an archive) to students. So far, I've separated the work into two directories per chapter (one for the full solution, one for the partial).<p>The problem is - if I want to modify something in any place and want to keep it consistent, I need to make a change in 8 directories.<p>I've been thinking about the best way to organize it but can't think of any approach that would be simple and would allow me to change the code in a single place.<p>I was thinking about submodules, but the projects are not clear-cut, sometimes the same files will be modified in multiple chapters.<p>I would hugely appreciate any thoughts you might have!
Write a script that builds the repo from scratch. (Perhaps by applying diffs against the previous directory.)<p>Then you just need to update an rerun the scripts (or one of the files/diffs it depends on.)<p>Keep this script and its helper files in a separate repo.