I'm trying to figure out how Git Submodules work. I read a lot of documentation online and managed to add submodules to my project. This seems to work but for some reason I keep getting this warning in my terminal:
warning: adding embedded git repository: web/modules/custom/svds_adminmenu
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> web/modules/custom/svds_adminmenu
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached web/modules/custom/svds_adminmenu
hint:
hint: See "git help submodule" for more information.
I find this strange because the svds_adminmenu repository is the one I added as submodule. So why is it still giving me this warning.
What I did to get this is the following:
git clone path/repo.git
And after this I used the following
git submodules update --init
I got this warning in the terminal when I made changes to the .gitignore file and did the following:
git rm -r --cached
git add --all
git commit -m '.gitignore changed'
What is going wrong?