Block nginx .git directory

 server {

    listen 80;

    server_name web.kaptan.dev;
    root /var/www/web;

    location ~ /\.git {
        return 404;
    }
}