Re: Splitting a project into branches afterwards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Yohann Bénédic <yohann.benedic@xxxxxxxxxx> writes:
>
>> branch. If the framework branch moves forward, I want my product_A branch to 
>> be able follow along : that's a merge of the framework from product_A. In 
>> product_A, I might fix something from the framework and need to patch the 
>> latter. That's a merge in the other direction.
>
> Instead of doing a mixed ball of wax on product specific branch,
> can't you do the latter by (1) fix something that belongs to the
> framework part of the system on the framework branch, (2) merge that
> to product A branch, and then (3) use that fixed framework code to
> update the product A?  That way you would never have to merge
> product specific part to the framework, which is meant to be product
> agnistic (which is the whole point of your "initial removal" done on
> the framework branch, if I am reading you correctly).

In addition, I would imagine that you have this:

      F+B
     /
 ---X---F
     \
      F+A

where F stands for "framework part", A stands for "product A" and X
is F+A+B (i.e. everything).  The first thing I would do if that is
what you have is to abandon the product specific branches directly
forked from the "everything" and instead form a history of this
shape:

          F+B
         /
 ---X---F
         \
          F+A

That is, make the commit marked F in the updated history, whose tree
has only the framework part, the new "birth" of your company's
source code, where other product specific branches all fork off of.

Then touch the common framework only on its own branch, occasionally
merging that down to (all) product specific branches, change product
specific parts only on their own product specific branch, and merge
only in one direction (i.e. framework to product), never in reverse.

          F+B
         /
 ---X---F-----F'-----F''   ... framework evolves this way
         \            \    
          F+A---F+A'---F''+A'  ... product A evolves this way


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]