Re:Please stop serving .git to the outside world
by dan15 on Monday June 10, 2013 @09:19AM
(#5854109)
.git should never be in your web root... I can't think of any situation (other than a very simple site) where you'd want to just stick the whole Git repository in the web root. Normally there's a bunch of other things in the repository (documentation, database scripts, etc.) that you wouldn't want exposed publicly.
[ Parent
| on HN ]
Re:Please stop serving .git to the outside world
by dsirijus on Monday June 10, 2013 @09:36AM
(#5854192)
You can hide it very easily with any of the virtual host syntax, and it's easy to deploy that way. I say, why not.
Re:Please stop serving .git to the outside world
by brown9-2 on Monday June 10, 2013 @10:40AM
(#5854682)
You could also very easily add one additional command to your deploy script to copy all the web content from the directory being pulled to to the web root, and not have to worry about any accidents.
Re:Please stop serving .git to the outside world
by astrodust on Monday June 10, 2013 @11:17AM
(#5854971)
Or you could set the web root to be that directory.
Re:Please stop serving .git to the outside world
by dan15 on Tuesday June 11, 2013 @08:11AM
(#5861162)
Hiding it is riskier than just not having it there in the first place. Why blacklist when you can whitelist?