I have a closed source project that is built on my open source framework. I want to know how I should structure my workflow. Below is my best guess using git with submodules.
- I create a public framework repo on github with submodules that are separate git repos.
- I purchase a "micro" account on github ($7) so I can have a private repo.
- I create a private repo and clone the public framework repo.
From here I can make changes to:
- My private code and push to my private repo on github
- The public framework code and push to my private github repo and then send a pull request from the public framework..? Or how would this work?
How do I handle a repo that contains private and public code and submodules. Right now it seems like I just have to maintain two separate codebases to achieve this.
I'm looking for the best answer that can help someone fairly new to git streamline the process of working on a codebase that is half open source and half private. One good thing about it is that each folder is either private or public so there is no worry about having private and public files together somewhere - yet some of the private folders might be in public ones!
Another example I could give would be using zendframework to build your private company site while still being able to do pulls each day (and maybe patch pushes) to the zend repo. And also pulls and pushes of your private site inside the zendframework.
For example, imagine a directory structure like this:
/private_folder
/public
/public_folder
/public_folder2
/private_folder
Perhaps I'm asking two much to handle them all in one joined repo directory. Maybe there is no easy way to do this and I should separate them and do all the public patches in one and then just pull into my private repo. Of course, this means that if I am in the middle of working on some private code - I'll have to leave that repo and go open up the public one and make the patched code change, then go back to the private one, merge, and then continue working on the private code.