Git stop permissions to access git folder on site

Arun - 28/08/2020 11:18 PM

Ref. – https://stackoverflow.com/questions/6142437/make-git-directory-web-inaccessible

 

Any of the following methods can be used.

Files 2

add this code in main htaccess file of project
text
RedirectMatch 404 /\.git
create htaccess inside .git and add this
text
Order allow,deny
Deny from all