views:

27

answers:

1

If the correct security concerns are put in place, is there any reason to not serve a directory that contains a GIT repo of production code. The directory is a webroot of an application but if one uses say Apache to deny access to .git files would there be any reason to not do it this way?

A: 

As long as it's impossible to access the .git folder or any of the files contained with it there shouldn't be any issues. But you need to make sure that it's not possible, else you give people access to your full repo and they could simply git-clone it.

igorw