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?
Ta,
Joe.
--
Gmail is watching you!!!!!!
Please don't publish this email address or use it for anything SPAM
risky. My more public email address is joe@draxil.uklinux.net
On Tue, Jun 9, 2009 at 5:53 AM, joe higton[off-list ref] wrote:
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?
You might want to try just using
git diff old-version new-version | patch -p1
(where old-version and new-version are the appropriate commit ids or
branch names or whatever)
And then committing the results.
Have fun,
Avery
2009/6/9 joe higton [off-list ref]:
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.