3 ms·
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.
by Tichy 14y ago
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.
- Xymak1y 14y agoHidden directories are usully not accessible from outside I think.
- gurkendoktor 14y agoI had to change my Apache config on OS X 10.6 exactly because I was leaking .svn directories. Unbelievable.
- rlpb 14y agoYou 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).
- mappu 14y agoSurely 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, ...)