Ari
Ari

Reputation: 3127

How to manage many modules in git repository

I have a project with several modules, some depends on others, for example:

Developing A or B cause many changes in X.

I have development branch on git where I am developming A and B.

How can I manage pushing A or B to some sort of stable branch?

I mean, I have situation like:

[Actual Stable Branch version, commit after this are in develompent branch]

After commit 3 I want push A to stable. So I need Commit1:A,X, Commit2:X, Commit3:A,X

Is there any way to do this? I don't want additional repositories inside this.

Upvotes: 1

Views: 185

Answers (1)

VonC
VonC

Reputation: 1324577

You still need an additional repo, ie a "parent repo" which will memorize the exact commits of A, B, and X.
This is what submodules are for: A, B and X would be declared submodules of a parent repo.

you would push your modifications as usual (to the branch of your choice), but in addition you would also commit and push the parent repo, in order to record the commits of each submodules.
See "True nature of submodules" for more on that way of working.

Upvotes: 1

Related Questions