Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't this approach also put the .git directory below ~/www, making it accessible to the world? That might not be such a good idea.


You can have git separate the .git directory and the working directory by setting GIT_WORK_TREE and GIT_DIR in the post-receive hook. I usually put the git directories in /var/local/git, and I have some scripts to automate everything, but essentially I use this mechanism for certain projects (and for testing).


Surely the entire project doesn't consist of world-readable files? There's likely to be a htdocs or wwwroot subdirectory in there alongside .git that apache/nginx point to. Then, you have an extra level of breathing room for other files for the site (config files, session data, user uploads, ...)


Hidden directories are usully not accessible from outside I think.


I had to change my Apache config on OS X 10.6 exactly because I was leaking .svn directories. Unbelievable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: