1

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

  • X
  • A, which depends on X
  • B, which depends on X

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]

  • Commit1: changes A and X
  • Commit2: changes B and X
  • Commit3: changes A and X

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.

Ari
  • 3,073
  • 1
  • 23
  • 47

1 Answers1

1

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.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • I was afraid of that. Thanks for reply, I'll read it, maybe I was using sumbmodules wrong way – Ari Oct 04 '12 at 12:08