I'm working on a Lua library that involves code generation and validation among other things - a lot of development code of project is written in another language.
I'd like to have one branch for library and another for rest code. Library shouldn't know it depends on something - for user's convenience first of all. Users should be able to find rest code if they read docs though - it's not private.
Branches should be synchronized: to avoid bugs like "wrote some code in project, but it doesn't affect library" - forgot to update, to make convenient CI, to make clean git history.
Current project is two folders at the root of master branch. I'd like to separate them without breaking synchronization. Could I achieve this without using separate repos? Or using separate repos fits here and it's convenient? Reference to documentation or some project with similar systems may be enough.
Two branches of same repo seems unsuitable here - it's necessary to work simultaneously on both parts. I don't want to use separate git repos - then I need to use separate git histories, they should be identical and it's just seems inconvenient to manage multiply repos - but I don't see other option. Also, I don't know, how to properly synchronize them, google provides results "how to force repos to have identical content" - that's not that I want.
Git with separated development and releases is about how to develop in private, then push to public - I need both in parallel. The rest seem irrelevant to me.
The main thing I don't like in approaches I know is that most changes will require several commits - one for each branch/repo. Duplication (e.g. exactly the same messages) always leads to mistakes. Can it be avoided?
I've read question rules, it seems, my question is open and it's forbidden. Also, it doesn't look like helpful to other (question, answers are helpful for people like me, who didn't know about some git possibilities). Should I delete this?