我有我使用github上(闭源)跟踪变化和更新的网站一个网站。唯一的问题是,它出现在.git目录是通过网络进行访问。我怎样才能阻止这一点,仍然可以使用git?
I have a website that I use github (closed source) to track changes and update site. The only problem is, it appears the .git directory is accessible via the web. How can I stop this and still be able to use git?
我应该使用的.htaccess? 我应该改变git的权限?
Should I use .htaccess? Should I change permissions of .git?
创建一个的.htaccess
文件中的 git的
文件夹,并把下面这个文件:
Create a .htaccess
file in the .git
folder and put the following in this file:
Order allow,deny
Deny from all
上一篇:如何从一个子目录中删除的.htaccess密码保护密码保护、目录中、htaccess
下一篇:如何使用mod_headers中和mod_expires缓存缓存、如何使用、mod_headers、mod_expires