I use git version controll and I have multiple projects that uses same base directory, although some changes are made project specific.
Is there a way I could track with same git repo the superfolder (root/private/core in my case) and both public and private project specific directories aswell. Also, if I make changes in one project to core files, I would like that changes are made in other projects git repo aswell.
The way i have came up is to make a git repo in the root folder and then make branches for project, and not track other project files. But with this method I have to merge core changees in other projects and there is kind of a logic error aswell, because in this case branch would be used as project.
I have looked into submodules aswell, but that seems not to be the best solution aswell. If there is a solution that requires me to change my project directory system I am able to do it, although i would like to keep public, private and core directorys separately.
Simplified example of my directory at the moment:
- root
- private
- core
- projects
- project1
- project2
- public
- project1
- project2
- private
In private project folder there are core php extensions that are project specific and in public project folder is only stylesheets, javascript and index.