There was an error while loading. Please reload this page.
If you are using the nginx HTTP server, add the following location directive to your nginx.conf file:
location
nginx.conf
location ~ /\.git { deny all; }
If you want to return a 404 HTTP status code instead of 403, use the following instead:
404
403
location ~ /\.git { return 404; }
Don't forget to restart nginx after making the change, e.g. on Debian:
sudo systemctl restart nginx