I was working on a Kohana 3 project, which I installed using a downloaded zip file some time ago. I have a git repository on my remote project.git server that checks the latest commits to the public_html working directory where I am testing the application
My file with an attached message
GIT_WORK_TREE=/var/www/public_html;
git checkout -f;
which worked a couple of months until I decided to delete some kohana folders and use the git submodule instead, so I can do updates through git.
Now the problem is that the submodules are not in the working directory. I tried to go in there to add submodules, but the public_html directory is not a repository. In the "project.git" directory, git commands throw an error that I have to execute in the working directory.
How do I change my hook for checkout subframes when I commit?
Update
As suggested by @manojlds: I added it to the hook, and now it looks like this:
GIT_WORK_TREE=/var/www/public_html;
git submodule init;
git submodule update;
git checkout -f;
But I get this message,
remote: You need to run this command from the Top level of the working tree
and no changes to submodules in
public_html
source
share