git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to apply diff between A and B to a file?
@ 2008-02-25 18:43 Denis Shaposhnikov
  2008-02-25 18:58 ` Jakub Narebski
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Shaposhnikov @ 2008-02-25 18:43 UTC (permalink / raw)
  To: git

Hello,

With svn I used a command "svn merge -r A:B some/file" to apply diff
between revisions A and B to file some/file. I done it in one branch,
in trunk for example. Is it possible to do such thing with git?

Thanks!

-- 
DSS5-RIPE DSS-RIPN mailto:dsh@wizard.volgograd.ru xmpp:dsh@vlink.ru
http://wizard.volgograd.ru/ 2:550/5068@fidonet 2:550/5069@fidonet

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to apply diff between A and B to a file?
  2008-02-25 18:43 how to apply diff between A and B to a file? Denis Shaposhnikov
@ 2008-02-25 18:58 ` Jakub Narebski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2008-02-25 18:58 UTC (permalink / raw)
  To: Denis Shaposhnikov; +Cc: git

Denis Shaposhnikov <dsh@wizard.volgograd.ru> writes:

> Hello,
> 
> With svn I used a command "svn merge -r A:B some/file" to apply diff
> between revisions A and B to file some/file. I done it in one branch,
> in trunk for example. Is it possible to do such thing with git?

Not using "git merge", which is by design whole tree opration in
Git. It must be, to support rename detection.

You can, however, do the following:

  $ git diff A B -- some/file | git apply --index

(not tested!).
-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-25 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-25 18:43 how to apply diff between A and B to a file? Denis Shaposhnikov
2008-02-25 18:58 ` Jakub Narebski

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).