Reputation: 26873
I've developed a customer project using a private repo at GitHub. What we want to do now is to open a certain part of it and produce an open source version of the project. The idea is that the customer's version will be built upon this one. Any changes made to the open source version should flow to the private one as well.
Now, the problem is that I cannot just set the current GitHub repo visible to all. There are certain pieces of code that should remain available only to the customer. So, to the actual set of questions:
I guess I could start the repo from scratch and then work based on that but in that case I would lose some valuable history information.
Any ideas are appreciated. If needed I can provide you some more detail.
Upvotes: 3
Views: 5054
Reputation: 33537
You could try separating the project into two, then use git submodule
to connect them.
The parent project which is private could hold a submodule project which is public.
See http://help.github.com/submodules/ for more details.
Upvotes: 4
Reputation: 12866
Concerning the 2nd part of your question:
You can use git filter-branch to remove files or entire directories from your history.
Also see the question: How do I remove sensitive files from git's history.
Upvotes: 4