Answer the question
In order to leave comments, you need to log in
Move the .git folder outside of the site's root folder, but still be able to do a git pull?
In the root folder of the public_html site is the .git folder , inside of which is now .htaccess with deny from all inside.
I would like to remove the .git folder outside of public_html , while maintaining the update functionality on the server. Now updates are done using .sh of the form:
cd /var/www/vhosts/site.ru/public_html
git pull
php protected/yiic.php migrate
Answer the question
In order to leave comments, you need to log in
Create a public directory in the repository and put all site files there, after that, change the root directory in the web server config, adding public at the end .
You will get a full-fledged git turnip without .git in the root of the site.
For example:
Path to turnip:
/www/sitename/
In the directory are:
.git
public
/www/sitename/public/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question