3

Is it possible to work with two independent git projects, one within another in the directory tree and separate them using only gitignore (without submodules or subtrees)?

Here is the folder structure:

repo_a     <-- repository A folder
   /.git
   /folder_1
   /folder_2
   /repo_b    <-- repository B folder (to be ignored by repository A)
       /.git
       /folder_3
       /folder_4
Community
  • 1
  • 1
Paulo Coghi
  • 10,054
  • 11
  • 63
  • 85

1 Answers1

1

This is possible. Configure the repo_a to ignore the repo_b by adding :

repo_b/

in the .gitignore

This will ingore the directory, meaning if you clone the repo_a it will not have an (empty) repo_b directory.

Félix Cantournet
  • 1,741
  • 12
  • 15