简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM