I have a Kirby site I’ve been working on for some time. It’s tracked in a git repo (which I also use to deploy to my web server). I’ve been unable to get git submodules working for updating the /kirby and /panel directories.
I understand that this is one way to initialize those directories as submodules:
If you started with a copy of the starterkit repo, you can simply run git submodule update --init --recursive, as the submodules are already registered in that repository.
What exactly does not work and which error message is generated by Git?
I did not start with the starterkit repo. I’ve been updating manually by downloading the Kirby zip file and copying the kirby and panel directories into my project repo.
In that case the commands you posted are exactly the right way to setup everything. Simply make sure to delete the Kirby and Panel directories first and run the three commands. After committing, you now basically have your own starterkit repo with your own code.
@gtc, are you pushing to github or to your own server? Some deployment options like dandelion and git-ftp don’t work with submodules. see: Deploying via Git
as the new 2.1.2 is out I wonder if it is possible to add this as a submodule to an existing kirby project, i.e. there’s already a kriby folder but I want to sync it with the submodule now …