I am planning my directory structure for a linux/apache/php web project like this:
Only www.example.com/webroot/
will be exposed in apache
As soon as you need to reuse some set of files elsewhere, that's when you should start thinking in term of components or (in git) submodules
Instead of managing webroot
, and comp
, and lib
within the same repo (which is the SVN or the "Centralized way" for CVCS), you define:
img
' would be a Git repo reused as a submodule within webroot
, for instance)That is one of advantages of submodules of symlink: you reference one exact revision, and if that component has some evolutions of its own, you don't see them immediately (not until you update your submodule anyway).
With a symlink, you see whatever state is the set of files at the other end of that link.