Z
Z
zednight2013-10-10 07:46:59
git
zednight, 2013-10-10 07:46:59

Git branching strategy for a modular project framework

I am developing an abstract project on the php framework. In fact, I'm making a blank for future projects. Projects can be different and include the use of a database or not, similarly with user authorization. In my vision, user authorization and registration without a database is not possible. It turns out that in the version control system, authorization is a separate branch, and the branch comes from the database branch. And here is the result: A large, beautiful tree with a bunch of branches. And now a project has appeared and it must be implemented using this tree. Here is the question of how best to do this. One of the options that came to my mind: create a separate branch at the root and cherry-pick to transfer all the necessary commits. But it seems to me that such a solution is too clumsy and not flexible, are there better suggestions?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
K
Kirill Boldyrev, 2013-10-10
@usetester

You don't need branches, you need submodules. Google git submodules. One , two ...

M
Michael Danilov, 2013-10-10
@MonkAlbino

And what prevents you from forking your framework and merging the blocks you need in it? In fact, you will have an independent project that is a descendant of the framework and uses some of its developments.

Z
zednight, 2013-10-10
@zednight

What do you mean by fork?
Sorry wrote in the wrong place

V
Vyacheslav Plisko, 2013-10-10
@AmdY

git has nothing to do with it, you have banal dependencies, in the php world this is solved through pear or composer, other languages ​​have their own package managers. each package is stored in its own repository and has only a file that prescribes dependencies.

J
JULIKK, 2019-10-16
@JULIKK

git submodules will help you with this.
You can read about strategies here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question