Where can I see the gitlink entry mentioned in gitsubmodules(7)
?
For a submodule with working directory at path/to/bar/
, the gitlink entry should be located at /path/to/bar
and contain the SHA-1 hash of the submodule's commit?
$ git submodule status
139dedcb98fca8fb69d70305709783ff40316cd4 tabulous (0.5.0-2-g139dedc)
24afe922e6a05891756ecf331f39a1f6743d3d5a vim-repeat (v1.2-9-g24afe92)
f51a26d3710629d031806305b6c8727189cd1935 vim-surround (v2.1-18-gf51a26d)
$ ls -la tabulous/
total 72
drwxr-xr-x 8 nlykkei staff 256B Apr 5 17:25 ./
drwxr-xr-x 5 nlykkei staff 160B Apr 4 12:00 ../
-rw-r--r-- 1 nlykkei staff 67B Apr 4 12:00 .git
-rw-r--r-- 1 nlykkei staff 21B Apr 4 12:00 .gitignore
-rw-r--r-- 1 nlykkei staff 18K Apr 4 12:00 LICENSE
-rw-r--r-- 1 nlykkei staff 5.0K Apr 5 17:25 README.md
drwxr-xr-x 4 nlykkei staff 128B Apr 5 17:25 doc/
drwxr-xr-x 3 nlykkei staff 96B Apr 5 17:25 plugin/
$ cat tabulous/.git
gitdir: ../../../../../.git/modules/vim/pack/bundle/start/tabulous
man 7 gitsubmodules
:
...
Assuming the submodule has a Git directory at $GIT_DIR/modules/foo/ and a working directory at path/to/bar/, the superproject tracks the submodule via a gitlink entry in
the tree at path/to/bar and an entry in its .gitmodules file (see gitmodules(5)) of the form submodule.foo.path = path/to/bar.
The gitlink entry contains the object name of the commit that the superproject expects the submodule's working directory to be at.