git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Barkalow <barkalow@iabervon.org>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: How to pull only a few files from one branch to another?
Date: Wed, 24 Jan 2007 00:29:00 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701240019250.20138@iabervon.org> (raw)
In-Reply-To: <17846.53626.895660.762096@lisa.zopyra.com>

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

If there's other stuff in the nit-fixing commit, shame on you, but you can 
edit the patch before applying it to remove everything that's not what you 
want.

(Incidentally, I think "git diff ^ {commit}" should be made to do "git 
diff {commit}^ {commit}"; i.e., if there is a single other revision 
provided, interpret a modifier not applied to anything as applying to that 
revision, in the "what else could that possibly mean?" department.)

	-Daniel
*This .sig left intentionally blank*

  parent reply	other threads:[~2007-01-24  5:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24  3:24 How to pull only a few files from one branch to another? Bill Lear
2007-01-24  4:11 ` Linus Torvalds
2007-01-24  4:18   ` Linus Torvalds
2007-01-24 10:14     ` Johannes Schindelin
2007-01-24 10:16   ` Johannes Schindelin
2007-01-24 11:03     ` Bill Lear
2007-01-24 20:39   ` Yann Dirson
2007-01-24 20:46     ` Jakub Narebski
2007-01-24 21:27       ` Yann Dirson
2007-01-24 22:04         ` Jakub Narebski
2007-01-24 21:30     ` Linus Torvalds
2007-01-24  5:29 ` Daniel Barkalow [this message]
2007-01-24  6:02   ` Bill Lear
2007-01-24  6:07     ` Shawn O. Pearce
2007-01-24 14:52     ` Andy Whitcroft
2007-01-24  6:58   ` Junio C Hamano
2007-01-24  9:32   ` Jakub Narebski
2007-01-24 19:46     ` Daniel Barkalow

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=Pine.LNX.4.64.0701240019250.20138@iabervon.org \
    --to=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=rael@zopyra.com \
    /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).