Is there a way to `git submodule add` a repo *without* cloning it?

After a long walk on the internet, I found out that you can achieve what you want by writing directly in the git index and create the “gitlink” file type.

git update-index [--add] --cacheinfo 160000 <subrepo commit hash> <submod path>

Also do not forget to write the subrepo in .gitmodules (declare the external path, mostly).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)