There was an error while loading. Please reload this page.
https.conf
If you are using the Apache HTTP server, add the following DirectoryMatch directive to your global httpd.conf file:
DirectoryMatch
httpd.conf
<DirectoryMatch "/\.git"> Require all denied </DirectoryMatch>
<DirectoryMatch "/\.git"> Deny from all </DirectoryMatch>
Note
Don't forget to restart Apache after making the change, e.g. on Debian:
sudo systemctl restart apache2
.htaccess
If you are using the Apache HTTP server on a shared host, add the following directives to you local .htaccess file:
RewriteEngine On RewriteRule ^\.git - [F]