Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: Apply patch on server w/o git

From: Bryan Donlan <hidden>
Date: 2016-06-15 22:44:25

On Tue, Mar 25, 2008 at 2:25 PM, Joe Fiorini [off-list ref] wrote:
I am trying to generate a diff patch on my local dev box.  I want to
 upload this patch to a server (running Windows Server 2008) and apply
 it to my staging code.  The catch is: I cannot install git on the
 server to accept the patch.  Therefore, I would like to use a generic
 patching tool (such as patch from the GnuWin32 tools).  I tried
 generating a unified diff with the following command:

 git diff -U > diff.patch

 and then tried to apply it using:

 patch -u -i ..\other_dir\diff.patch

 and I got the error:

 "patch unexpectedly ends in middle of line" ... "Only garbage was
 found in the patch input"

 It might be a problem with how I'm using patch, and if so, forgive
 me.  If not, then how can I generate a generic diff format from git so
 I can do what I want?

 Thanks all!
 Joe Fiorini
Just a guess, but the gnuwin32 tools might not like unix line endings.
Try opening and re-saving in wordpad (or vim :set ff=dos, or $insert
your favorite method here).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help