Reputation: 306
I have a git repository internal to the organization. Within that git repository is a folder containing a feature.
readme.md
feature
|_
readme.md
We wish to make the feature available as open source on GitHub. Over time, we expect to make changes to the feature in our internal repository and release those to open source. We also anticipate that our user community will make changes on GitHub that we'd like to incorporate into our internal repository.
How can we maintain these two separate repositories containing parallel codebases for the feature and periodically merge code across between them?
Upvotes: 2
Views: 698
Reputation: 105
Have a look at this Git Submodules
It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.
Git addresses this issue using submodules. Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate.
Upvotes: 2