Re: Best way to generate a git tree containing only a subset of commits from another tree?

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

 



Dear diary, on Wed, Mar 22, 2006 at 08:28:52PM CET, I got a letter
where Anton Altaparmakov <aia21@xxxxxxxxx> said that...
> Preferable I would like to do it so that later when Linus has pulled from 
> my /usr/src/linux-2.6 tree, I do a "git pull" of Linus' tree from 
> /usr/src/my-big-tree and it all works correctly and I don't end up with 
> the same commits twice.
> 
> Is that possible at all?

Not with Git - you will end up with the same commits twice, once when
you originally committed them and once coming cherry-picked from your
linux-2.6 tree through Linus' tree.

> If not what can I do to do it cleanly?  Does git help in any way or do I 
> literally have to export all my commits from /usr/src/my-big-tree to diff 
> style patches and then throw away the tree, clone Linus tree after he has 
> pulled my /usr/src/linux-2.6 tree and commit all my generated diff patches 
> again?  That would be rather horrible to have to do...

Yes, that's the way to go, but actually it's not horrible at all because
there's a tool to help you - check out StGIT, which will let you
maintain a stack of patches on top of a git tree and do all sorts of
cool stuff with them (including rebasing them to new tree revision, the
most important thing for you).

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
-
: 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]