While developing an application, it may be the case that, what in the beginning seemed an external module, perfect to be used independently on the application being developed, may become part of the business logic and can not be easily re-used.

The quickest solution, even if probably the less manageable, would be to use a sub-module. If you prefer a better way, you could try joining the two repositories, including the history of developed modules so far. Subtree is a tool embedded into VCS git, that could be helpful.

It is a good alternative solution, compared to the one involving a sub-module, as it allows to choose the merging type, e.g. with or without tree squashing, selecting a given branch instead of another.

git subtree add --prefix=module/Formatter git://github.com/gianarb/zf2-formatter.git master

In this example, the module zf2-formatter, master branch, is being merged inside your project, in the folder module/Formatter.

In this way, the development of an application will be much more agile, compared to the greater problems involved by the use of sub-modules for developing specific applications.

Comments

comments powered by Disqus

cloudparty

Follow Us