I am building a system with a foundation (You may call it a boilerplate or a framework) because the system need to be customized to deliver among many clients based on their specified requirement especially for look and feel and user experiences. So I need to create two repositories for my project. First one is a base repository contains ground level part for the foundation. The second one is the project specific repository which contains upper level part.
I'm looking for a solution to allow me to only have to open a project directory in a single workplace and can edit entire project inseparately. But after commit and push them, they go to different specific repository. One at a time git commands is acceptable.
If using git submodule add
, I can link from a parent repository to a child repository, so two project repositories may share and maintain the same sub-repository from their own sub-directory. But what I need is reversed from that. Projects do not among them share a common child repository but a common parent repository. Are there any Git's feature provided enable me to do that? Or any workaround either with Git or on client side? Or any way I can do it with submodule
but may restructure it later on client side?
What have I tried
I can't find any solution yet using submodule
. Not directly but I've managed to pull from multiple remotes and merge them, solved half of my problem. But still finding out how to select which files going to which remote on push.