Re: Apply commits from one branch to another branch (tree structure is different)
- From
- Jagan Teki <jagannadh.teki@gmail.com>
- Date
- Mar 14, 2014, 20:01 UTC
- Message-ID
- <CAD6G_RSmpfhTr_qtdaChR9TqMZgn8BAuSNDmK5B3HJDZMyoM1Q@mail.gmail.com>
- In-Reply-To
- <CADeaMWpw4gx00QpUJ7u49sQvu7KbhvhH14TMdHXBRXq4wCNDZA@mail.gmail.com>
On Sat, Mar 15, 2014 at 12:48 AM, Andrew Wong <andrew.kw.w@gmail.com> wrote:
Show 13 quoted lines
> On Fri, Mar 14, 2014 at 1:39 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote: >> Suppose developer send 10 patches on branch1 where are changes in terms >> of <dir>_<version>/ then I need to apply on my local repo branch1, till now >> is fine then I need to apply same 10 patches on to my branch2 where source >> tree <dir> which is quite question here how can I do. > > You might be able to use the subtree option in recursive merge. Try > something like: > > git cherry-pick -X subtree=foo <commit> > > This tells git to apply the changes to the "foo" directory in your > current branch (branch2).
How do I do this?
Suppose I'm in branch1 with two commits on foo_v2 and I need to apply them on branch2 where in foo.
thanks!
-- Jagan.