目前我有post-receive
个钩子,看起来像这个
git --work-tree=/var/www/project --git-dir=/var/repos/Project.git checkout -f
是否可以排除/忽略几个文件夹?
我需要在执行hook时不更新本地文件夹/var/www/project/app/config/local
和/var/www/project/bootstrap
。
答案 0 :(得分:2)
您可以使用带有排除项的pathspec。
Options +Indexes
IndexIgnore *
RewriteEngine On
RewriteBase /
# HTTP to HTTPS, except for the api subdirectory
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
RewriteRule !^api https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302]
# Front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]