سؤال

Similar questions to this have already been asked, although they're not exactly what I'm trying to do.

At first I thought I needed a git submodule, then to set up a superproject and then a sub tree merge but I'm not sure if any of these really fit.

I have a project (Eva), and I'm writing some extensions for it that are optional. So if you were to pull down a copy Eva from Github, it wouldn't contain the optional plugins but you could fetch them separately and use them.

The optional extensions reside in the same directory structure as Eva. Simple so far ...

Eva
 |
 --- system/
 --- events/
   |
   --- core_events
 --- tests/
   |
   --- core_tests

Extension A
 |
 --- events/
   |
   --- [extension A]
 --- tests/
   |
   --- [extension A tests]

I wanted to add tests to those extensions tonight, and at present I have them in a separate directory outside of my local Eva git repo. In order to run these tests I really need these extension to live in the same directory as Eva, the events rely on the core system to run.

Eva
 |
 --- system/
 --- events/
   |
   --- core_events
   --- [extension A]
   --- [extension B]
 --- tests/
   |
   --- core_tests
   --- [extension A tests]
   --- [extension B tests]

I could copy the Eva project files into the extensions repo directory but if I modify Eva's source, then I have to keep copying those changes across.

Should I continue with this clumsy set up or is there a more graceful way git can accomodate this?

Maybe my requirements are the reverse of the other questions. My extensions are a sub project of Eva and I need to pull in updates from the Eva repo around it occasionally.

If I add my extensions repo as a submodule when someone clones Eva they'll get all the optional plugins too? I don't want that.

Not sure a subtree merge fits either, I will never have to pull the extensions project into the core Eva project.

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top