I'm trying to setup my (Zend Framework) development environment (or more importantly my directory structure) with git. However, my underlying question really has nothing to do with the specific libraries involved but more importantly how to get git to accomplish what I am wanting.
I'm going to have my project root be /home/jsuggs/project
.
I'm also going to be working with/on Zend Framework (ZF), Doctrine, and other libraries, but I'll only focus on ZF since the solution for one will likely be the same for the others.
I will clone the ZF2 repository in /home/jsuggs/zf2
.
I would like to have /home/jsuggs/project/application/library/Zend
reference /home/jsuggs/zf2/library/Zend
.
I want the ability to work locally on both repositories (project and zf2), where switching branches in zf2 directly affects project.
My question is how do I setup Git so that the deeply nested libraries can reference my local versions during development but can also be set to (other/arbitrary) locations when deployed into production?
I would also like to avoid having the paths be absolute, so that if someone else worked on the project then the library path wouldn't referencing to my home directory.
I'm looking into using symbolic links and git submodules, but wondered if there were "best practices" for this type of setup. Also, it is completely possible that I am just doing it wrong so feel free to say "just do X instead."