Re: [git-users] Branching with dependencies
> From: Andrew > > My problem: suppose that I have two independent branches A and B, which may > not even touch the same files. Now I start a new development branch C which > wants to use features from different commits in A and B. I'd like C to to > branch off BOTH A and B. You can do such a thing, if the base commit of C lists two commits, one from A and one from B, as parents. This is what happens normally when you execute a merge, one parent is the one that was checked out in the working copy, and another parent is the commit that was merged from. But it's not clear to me that it would be worth the bother in your case. Having Git record that commit 2 is the descendent of commit 1 is only useful if a comparison of the two shows something useful, that a diff (or "delta") taken between the two clearly expresses the changes from the one to the other. If C is a mashup of features taken from A and B, is there enough correspondence between C's files and A's files to make a diff useful? Dale -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Branching with dependencies
On Friday, 15 November 2013 23:07:21 UTC+1, Magnus Therning wrote: > > > > 1. branch off A at the point you want > 2. merge in from B up till the point you want > > Excellent thank you. I thought I tried something like this but obviously not (or not very well) as I agree this works! Otherwise, there's always cherry-pick. > > How would you accomplish what you ask for in the VCS you currently > use? > Before we were, in effect, just passing around patches so, modulo the learning curve, git is a HUGE improvement. Thanks again, Andrew -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Branching with dependencies
On Fri, Nov 15, 2013 at 01:33:40PM -0800, Andrew wrote: > Hello, > > I'm in the process of moving to Git. Mostly I am very happy but I > figure out, or find a reference anywhere, of how you deal with > multiple dependencies in Git. > > My problem: suppose that I have two independent branches A and B, > which may not even touch the same files. Now I start a new > development branch C which wants to use features from different > commits in A and B. I'd like C to to branch off BOTH A and B. I'm > not sure that I can draw these fancy branch diagrams to the > standards of this group, but the situation looks something like > this: > > *--*--*--*--...--* master > | \-*--*--*--* A > | |-*--*--*--* C > |-*--*--*--*--*--* B > > Is it possible to do something like this in Git? Am I missing > something obvious? Your illustration got a bit mangled on the way to me, but wouldn't it basically just be to 1. branch off A at the point you want 2. merge in from B up till the point you want Otherwise, there's always cherry-pick. How would you accomplish what you ask for in the VCS you currently use? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin, Historical Review of Pennsylvania, 1759 pgpnV16YF6WCQ.pgp Description: PGP signature