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@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxx ((_/)o o(\_)) > ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' > http://iguanasuicide.net/ \_/ > > -- 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