Git submodules with separate work_tree

I followed the tutorial on this page to deploy my sites using Git simple: http://toroid.org/ams/git-website-howto . This has been fine so far, however, I recently started using Kohana and after this tutorial installed it on Git: http://kohanaframework.org/3.1/guide/kohana/tutorials/git .

My problem: when I click on my web server, none of the submodules are deployed. So how can I pull submodules into my working tree on my web server?

If I run

git --git-dir /srv/www/mysite.com/src/project.git --work-tree /srv/www/mysite.com/public_html submodule init 

it says

 fatal: working tree '/srv/www/mysite.com/public_html' already exists Clone of 'git://github.com/kohana/auth.git' into submodule path 'modules/auth' failed`. 

Does anyone know how to test these submodules? If I cannot find a way, I will have to resort to a manual FTP connection, which is not ideal.

+2
source share
2 answers

You need to push the submodules separately. Submodules are proprietary repositories.

Simply put, it will be

 git sub-module for-each git push 

(_ add the --recursive flag --recursive that it really works on steroids)

You will need to look for yourself, whether you want it. In addition, note that each default submodule will click on it by default (push branch)

You can also choose

Within a workstation:

 git submodule update 

First thing you might need

 git submodule init 
+1
source

Try running the CD into the submodule directory and just do git push .

Make sure you do git submodule init and git submodule update in the project root folder when you turn on the submodule.

0
source

All Articles