From: Emily Ren <lingyan.ren@gmail.com>
To: "Boyd Stephen Smith Jr." <bss@iguanasuicide.net>
Cc: git@vger.kernel.org
Subject: Re: How can I merge some files rather than all files modified on one branch to my branch?
Date: Tue, 3 Mar 2009 11:56:03 +0800 [thread overview]
Message-ID: <856bfe0e0903021956l549e41d2l97d7e0997067c133@mail.gmail.com> (raw)
In-Reply-To: <200903022110.23207.bss@iguanasuicide.net>
Junio and Boyd,
Thank you very much for your kindly guide ! I'll try these method.
Boyd,
How to rewrite the history of the branch ?
Thanks,
Emily
On Tue, Mar 3, 2009 at 11:10 AM, Boyd Stephen Smith Jr.
<bss@iguanasuicide.net> wrote:
> On Monday 02 March 2009 03:19:05 Emily Ren wrote:
>> I want to merge some files rather than all files modified on one
>> branch to my branch, how can I do?
>
> In addition to what Junio suggested, I'll offer another method, assuming the
> branch you are merging from is not yet published:
> (1) Rewrite the history of the to-be-merged branch so that all the changes to
> the files you want occur "before" and in separate commits from the file you
> want to ignore. So the current tree:
>
> A-->B-->C (yours)
> \
> ->D-->E (theirs)
>
> becomes:
>
> A-->B-->C (yours)
> \
> ->D1-->E1-->D2-->E2 (theirs)
>
> with D1 and D2 being the separate parts of commit D and similarly for E1 and
> E2.
>
> (2) Merge in the rewritten history, but only the part that you want, giving:
>
> A-->B-->C--->F (yours)
> \ /
> ->D1-->E1-->D2-->E2 (theirs)
>
> This preserves the full intent of what you are trying to do, a partial merge.
> If you merge "theirs" in fully at some point in the future, you shouldn't see
> any conflicts arising from not recording the merge or missing changes arising
> from recording a full merge that did not happen.
> --
> Boyd Stephen Smith Jr. ,= ,-_-. =.
> bss@iguanasuicide.net ((_/)o o(\_))
> ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
> http://iguanasuicide.net/ \_/
>
>
next prev parent reply other threads:[~2009-03-03 3:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-02 9:19 How can I merge some files rather than all files modified on one branch to my branch? Emily Ren
2009-03-02 10:04 ` Junio C Hamano
2009-03-03 3:10 ` Boyd Stephen Smith Jr.
2009-03-03 3:56 ` Emily Ren [this message]
2009-03-04 0:10 ` Nicolas Sebrecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=856bfe0e0903021956l549e41d2l97d7e0997067c133@mail.gmail.com \
--to=lingyan.ren@gmail.com \
--cc=bss@iguanasuicide.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).