From: Michael J Gruber <git@drmicha.warpmail.net>
To: Git Mailing List <git@vger.kernel.org>
Cc: fkater@googlemail.com
Subject: Re: merge only some of the changed files?
Date: Fri, 19 Mar 2010 14:55:42 +0100 [thread overview]
Message-ID: <4BA3825E.1070700@drmicha.warpmail.net> (raw)
In-Reply-To: <20100319134028.GA2318@comppasch2>
fkater@googlemail.com venit, vidit, dixit 19.03.2010 14:40:
> Hi all,
>
> I am quite new to git.
>
> If I want to merge branch B into A, however not all of the
> changed files in B, how do I do that?
>
> In other words: 'git diff --name-only A..B' lists 10 files
> but I want to merge only 5 of them.
If you are sure you don't want to merge the changes to them later on,
you can do the following while on branch A
# perform the merge but do not commit
git merge --no-commit B
# overwrite the files you want to keep with their version from A
git checkout HEAD -- file1 file2
# commit the merge result
git commit
Cheers,
Michael
next prev parent reply other threads:[~2010-03-19 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 13:40 merge only some of the changed files? fkater
2010-03-19 13:55 ` Michael J Gruber [this message]
2010-03-19 14:01 ` Thomas Rast
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=4BA3825E.1070700@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=fkater@googlemail.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