Reputation: 61379
I have a large code base which I use to perform a variety of tasks in hydroanalysis. There is a Github repository for this base.
I am publishing a paper which will include a separate Github repository containing a subset of this code base as a working example, as well as some other pieces of code specific to the paper.
Is there a way to have the paper's repository "automagically" keep its files which were drawn from the main repository up to date with the main repository?
The paper's repository must be able to be forked.
At the moment I'm updating files in both repositories in hand to keep things in sync. This seems error-prone and inelegant.
Upvotes: 0
Views: 145
Reputation: 70175
If all the files in the 'paper source code' are in one, two, a handful of directories, then you can make each of those directories a standalone git repository. Then you rework your 'main source code' to be built from submodules, based on the standalone git repositories, and other stuff. Your 'paper source code' will be built directly as submodules alone.
Upvotes: 1