git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: joe higton <draxil@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git merge selective files
Date: Tue, 9 Jun 2009 21:35:58 +0200	[thread overview]
Message-ID: <81b0412b0906091235g7a65d076l145c3eb3cbbdce3@mail.gmail.com> (raw)
In-Reply-To: <34b359190906090253v653ecc71q6684f4ebff2be59d@mail.gmail.com>

2009/6/9 joe higton <draxil@gmail.com>:
> Hi,
>     I want to merge changes from a branch but only to one file, I
> don't want to pick up the changes from other files. I've scoured
> google and the docs a bit but I can't find anything useful. Is this
> possible?

Generally - no. But you can have a merge with only the content
of your choice:

  git merge -s ours --no-commit other

then copy the changes you need manually, and commit.
See the manpage of git merge about "ours" merge strategy.

      parent reply	other threads:[~2009-06-09 19:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  9:53 Git merge selective files joe higton
2009-06-09 18:32 ` Avery Pennarun
     [not found]   ` <4A2EB575.8050107@workspacewhiz.com>
2009-06-09 19:39     ` Avery Pennarun
2009-06-09 20:54       ` Junio C Hamano
2009-06-09 19:35 ` Alex Riesen [this message]

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=81b0412b0906091235g7a65d076l145c3eb3cbbdce3@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=draxil@gmail.com \
    --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).