Re: proper way to merge?

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

 



2009/2/27 John Dlugosz <JDlugosz@xxxxxxxxxxxxxxxx>:
> I'm merging two branches: let's say "dev" is for development of future
> releases, and "rel" is changes made to the current release for immediate
> application.  Now I want to bring the changes made in rel back to dev.
>
> Rather than trying to merge it all at once, I'm applying the changes a
> few at a time and making sure it still compiles as I go.  Then,
> git-reset and I have dev as my HEAD and the desired merge result in the
> working tree.
>
> Now, I want to introduce the proper commit node to show that this is the
> graft.  But, I don't want to be presented with all the differences that
> I already resolved; I know what it should look like already.  How do I
> commit the current state of things and have it show up with both dev and
> rel as parents? (then make that the new dev)
>
> I'm also interesting in learning how to do it better next time.  But I'm
> doing the incremental merging now and need to know how to conclude it.

Instead of merge, I prefer to rebase.  so:

git checkout dev
git rebase origin rel

This replays each commit made in 'dev' on top of release, letting you
fix each commit separately.  It also means that when I commit to
release, the changes are a nice tree.

This only works if you have a relatively small number of changes.  I
tried to rebase 50 patches from 'dev' to 'rel' where the patches
changed pretty much every file.  It took all day to do.  (But it was
still better than trying to merge, in my specific case)

JohnFlux



>
> --John
>
> TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
> --
> 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
>
--
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]

  Powered by Linux