I have n
repositories with content that I would like to make available in a directory of my server. The server directory will be dynamically scanned for content for to work with that content.
However, I would like to keep the repositories which I like to import as they are. I do not want to merge or perform any one-way tasks. The source repositories really should remain independent.
When I git pull
on my server directory, I'd like to update all those files that I subscribed to. Note that it does not have to be git pull
but you get the idea of what I mean.
This is what it should look like (there are more files and repositories, it's just an example):
- github
- repo 1 with 10 files
- repo 2 with 5 files
- server
- content-directory
- 2 files "subscribed" out of repo 1
- 1 file "subscribed" out of repo 2
Changes on github
's repositories should be applied to the server-directory files as soon as I do something like git pull
in there.
Is there a simple way of doing this?
My approach: Create clones of those repositories in content-directory
but then I would get the whole repo although I only want some files. .gitignore
prevents from uploading but not from downloading.
Maybe there already is a good way that I just do not know.