Re: How to pull only a few files from one branch to another?
- From
Andy Whitcroft <apw@shadowen.org>
- Date
- Jan 24, 2007, 14:52 UTC
- Message-ID
- <45B772A0.3040806@shadowen.org>
- In-Reply-To
- <17846.63082.935311.947093@lisa.zopyra.com>
Bill Lear wrote:
Show 21 quoted lines
> On Wednesday, January 24, 2007 at 00:29:00 (-0500) Daniel Barkalow writes: >> On Tue, 23 Jan 2007, Bill Lear wrote: >> >>> I have a long-running topic branch. I have fixed a few nits on >>> the master branch that I would like on the topic branch. How do I >>> pull in only a few files from the head of the master branch? >> You don't pull in a few files, you apply the changes made in a few >> commits: >> >> git diff HEX_OF_NIT_FIX^ HEX_OF_NIT_FIX | git apply >> ... > > Good technique. Thank you for sharing. > > I had been thinking about trying something along the lines of Junio's > "Separating topic branches" posted on the "GIT Howto Index" page. I > may have tried that had I been braver. > > I probably should have thought ahead and made this fix on a branch, > merged it into my master branch and then into my topic branch ... I > think.
Perhaps you can just rebase that one fix 'back' onto the base. Then merge it into both.
-apw