Background
I've searched a lot and I am aware that different folder permissions under the same repository is something that is not supported by git. However, I still haven't found a satisfactory git model for my infrastructure although I've studied both submodules
and subtree
References
- Why are git submodules incompatible with svn externals?
- Using two git repos in one folder
- Differences between git submodule and subtree
- Vendor Branches in Git
In this point have to thank @VonC for his immense contribution to my understanding of those models
Infrastructure
I maintain a highly configurable application so most of my commits affect both the source and the configuration so I have placed them under a single git repository which structure looks like this:
.
└── myapp
├── README.md
├── source
└── conf
Issue
My issue is that my conf directory needs to be exposed to the client (part of what makes my product highly configurable) who wants to perform a git-pull
but for obvious reasons I don't want my client to get the source directory as well.
Workaround
.
└── myapp-conf
└── "configuration"
.
└── myapp-source
├── README.md
└── "sources"
This structure assumes two distinct repositories with no connection between them whatsoever, which doesn't meet my exact needs by saves me from the hustle submodules
and subtree
introduce,
Need
A way to:
- associate a single commit ID to changes in both source and conf directories
while at the same time
- being able to prevent the client from pulling my source code.
Sorry for the long question and thank you all in advance.