Mikulas Dite
Mikulas Dite

Reputation: 7941

Git submodule from just a directory of another repository

Is it possible to create a submodule that does not link to a repository directly, but to a directory inside it?

For example, let fw.git be a framework repository, with these dirs:

|fw.git
\---|test
    |code
    |tools

I'd like to submodule the framework code, just the code directory, not other directories.

Upvotes: 4

Views: 1968

Answers (1)

Mikulas Dite
Mikulas Dite

Reputation: 7941

No, it's not possible. Linus intentionally made git not work like that.

Upvotes: 2

Related Questions