问题
I apologize for the somewhat confusing question, I'm not sure how to explain it in short. Let me also apologize that I'm fairly new to Git and so I may be missing an obvious solution (thus why I ask).
So essentially, I have a three step project here that I'm trying to easily keep up to date:
I'm developing in CakePHP, which is regularly updated.
Using CakePHP, I am developing a system I've called "Mobile Fort," which is basically a fully developed user management system with a few other features.
Using Mobile Fort, I'm developing several different individual websites.
The question is, how do I (if possible) use Git to keep my CakePHP install up to date (CakePHP is developed in Git) to Mobile Fort, and keep my Mobile Fort install up to date across the various individual projects?
Thank you so much!
回答1:
I think what you need is git submodules. Basically it allows you to have a subrepo within a repo, while keeping them distinct from each other. Read the doc to learn more.
回答2:
Based on Simon and Tempus's response I did more research, and found a great article on using CakePHP as a submodule to accomplish this exact purpose. Hopefully this will be useful for other's using CakePHP and Git:
http://www.bravo-kernel.com/2010/03/cakephp-as-a-git-submodule/
This was the harder portion, since it seems counterintuitive to make CakePHP a submodule. The rest can be done using submodules as they were intended.
Thanks to Simon and Tempus!
来源:https://stackoverflow.com/questions/8001996/how-to-manage-a-project-dependent-on-another-project-in-git