Help with GIT submodules

I have a Kirby project housed in a GIT repo on my local computer. This contains submodules for both Kirby core and Panel as suggested by this article. I just pushed it to GitHub, then went onto my server and pulled down the repo. The ‘panel’ and ‘kirby’ folders are present, but empty.

Tried this via remote server, and it didn’t help.

git submodule foreach --recursive git checkout master
git submodule foreach --recursive git pull

My .gitmodules file includes:

[submodule "kirby"]
    path = kirby
    url = https://github.com/getkirby/kirby.git
[submodule "panel"]
    path = panel
    url = https://github.com/getkirby/panel.git

What you need to do:

git submodule init
git submodule update

I get this error:

No submodule mapping found in .gitmodules for path 'deploy/kirby'

I wonder where this path ‘deploy/kirby’ comes from … have you made any changes to the original setup?

The website is installed in a sub-directory of my repo called deploy.

I see, that is probably the reason why the submodule mapping does not work. You could try to change the path in .gitmodules to deploy/kirby and try again.

BTW: Even easier and more reliable is git submodule update --init --recursive, which works in one step.