0

Please consider the following project:

parent
|
|-- .gitignore
|
|-- .git
|
`--legacy
      |
      |-- .gitignore
      |
      |-- .git
      |
       `-- plugins
              |-- forum
              |     |
              |     `-- .git
              | 
              |-- chat
              |     |
              |     `-- .git
              |
               `--editor
                    |
                    `-- .git

Currently, parent project ignores legacy project (/legacy/ in .gitignore), and legacy ignores the plugins directory (/plugins/ in .gitignore).

From now on, I need git of the parent to handle chat and editor plugins. However the legacy project shouldn't be modified. I've tried adding the following entries in .gitignore of parent:

/legacy/*
!/legacy/plugins/

/legacy/plugins/*
!/legacy/plugins/chat/

I can't see chat from parent directory, so it doesn't work.

What're my options ?

smarber
  • 4,829
  • 7
  • 37
  • 78

1 Answers1

0

Try

/legacy/*
!/legacy/plugins/chat/

It looks the same thing, but its not. Explanation here