Git submodules: ln -s

How to create a link to a directory that will be saved git submodule update?

Given the following directory structure:

proj
|-- lib3
|   `-- submod
|       `-- lib
`-- lib

I created a soft link from proj/lib/to proj/lib3/submod/libusing something like the following command:

brad@bradpc:~/proj/lib$ ln -s ../lib3/submod/lib submodlib

creating the following directory structure:

proj
|-- lib3
|   `-- submod
|       `-- lib
`-- lib
    `-- submodlib

However, the launch git submodule updatedestroys my link. I got the impression that a soft link is a logical link to a relative path, so deleting an object and adding it again connect this link. How can I achieve the desired effect?

+3
source share
1 answer

, ln -s, , . , git, proj/lib3/submod/lib . , , rm proj/lib3/submod, mkdir -p proj/lib3/submod/lib.

(rm mkdir) openSuse Linux, .

? , .

+1

Source: https://habr.com/ru/post/1710447/


All Articles