I have a project that has components in several different directories and would like to treat the contents of those folders as a single git repository.
For example, I have something like
- A
- a
- b
and elsewhere
- 1
- i
- ii
and would like to combine them in a single git repository:
- repo
- A ..
- 1 ..
Can I do this with git?
No, you can’t. Git is designed to track the contents of a single directory hierarchy. The simple solution is to move all these directories into a common superdirectory. An alternative is to make several repos and then combine them using submodules.