Alternate modules/themes directory I'm trying to setup an alternate modules and themes directory which I can track with GIT separate from the contributed modules directory. 

Following this question, I created a directory in the following structure:

/var/www/Mysite
       -sites/samplesite/modules/mymodule


mymodule was working just fine when it was based in sites/all/modules/custom/mymodule but once moved it was no longer listing on the modules page, nor the features page - mymodule is features generated.

I attempted the following directory structure:

/var/www/samplesite
       -sites/samplesite/modules/mymodule


But it's still not working.

Can anyone please help me with this problem?
Putting modules in sites/samplesite/modules/mymodule is specifically for a multi-site setup.

Drupal won't just load all modules in all sites directories all the time, it will only load modules in the samplesite directory if you are hitting the samplesite domain (or you have an entry in the sites/sites.php file to tell Drupal which domains map to samplesite.

The other option from the page you link to is to make a directory in sites/all/modules that is a symlink to your custom module directory.
Then (assuming you're using Apache), make sure your server is configured to enable the FollowSymLinks option.

There are also a couple of other options:


Add a directory for your modules, eg. sites/all/modules/samplesite or whatever is logical to call it. Exclude that directory in your main .gitignore file. make that new directory a clone of your other modules repository. Alternatively you could not have the sub directory and have separate repositories for each module.
Using a similar directory structure as above, use git subtree to have a repository in a repository (or many individual module repositories if that is your requirement). This seems like a decent post to give you more information on git subtree: http://getlevelten.com/blog/tom-mccracken/smarter-drupal-projects-projects-management-git-subtree


Either method may be preferable depending on your situation however I would probably recommend the subtree method over the completely separate repositories. It would be easier to manage things like deployments, since with the subtree method the main repo still contains everything, even though the source repos are different.