While making a commit I’ve added few directories that are actually my local clone of 3rd party repositories. When cloning my repository to other machine those directories are empty. As I understand this could be dealt with git submodule
command but I always end up with No submodule mapping found in .gitmodules for path...
error. I’ve seen similar post on this forum, but found no answer. Could someone be kind enough to point me into right direction how to deal with such situation when managing repos on GitLab?
BR
Ok, I’ve found a way and I figured out I’ll share it:
- delete your external repos using
git rm --cached [repo-dir-name]
- clone again external repos using
git clone [reponame]
- add submodule repo using
git submodule add [repo-address] [repo-dir]
- push your changes using
git push -u origin master
When you (or other party) clone the top level repository to other host using clone
you need to issue:
git submodule update --init
If anyone has a better way I’d like to hear about it.