I have an application that has a lot of UI, DB, ... and also a background processing part. I want to keep the background processing part hidden from my contractors so they can't disclose the clever algorithm I came up with.
What's the right way to do that with git?
I started out with submodules: I have the main repo with all the UI, DB, ... in there and a secret repo which I included via a git submodule. After I change stuff in the processing part of the app, I minify it (it's JS), and save it to the main repo, so it can be used by the rest of the application. This way the contractor can pull my minified file as part of the main repo. Then run the app without the need for the secret code. So far so good.
However, the problems are:
- The contractor gets errors when checking out the main project because the submodule is not accessible for him
- The contractor has accidentally created a "remove processing submodule" commit, because the submodule folder is not there, and if he does
git add .
and then commits, git assumes that he wanted to delete the submodule.
So all in all it seems that's not the right strategy. I read that git subtree can be used, but I didn't find any example on how to use it for that use case.
Any help is highly appreciated!