Should git repository always be in its own directory

I would like to have several files in a folder that are managed by different git repositories. Is it possible?

I have the following folder structure for the project. It is part of the git repository:

plugins/
 - plugin.a.php
 - plugin.b.php
 - plugin.c.php

I would like to plugin.b.phpbe part of another repo. For example, I want the development of this plugin to be hosted on github. At the same time use and develop various projects.

When I use a git submodule for plugin.b.php, I need an empty folder to initialize the submodule, so I have a structure:

plugins/
 - plugin.a.php
 newfolder/
     - plugin.b.php
 - plugin.c.php

plugin.b.phpdoes not load, because, for example, my application only downloads files from the root plugins/. And I do not want to modify the application.

- ? , . plugin.b.php, plugin.c.php .

+3
2

. @tanascius, git .

tentativivly : GitHub. ...

, pluginb pluginc plugins. , github, gigub README, .

( , ):

.git/
.gitignore = .repos/
.repos/
     .git/
     - pluginb/
         README
         plugin.b.php
     - pluginc/
         README
         plugin.c.php
plugins/
     - plugin.a.php
     - symbolic-link = plugin.b.php
     - symbolic-link = plugin.c.php
+2

Source: https://habr.com/ru/post/1736482/


All Articles