git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Apply patch on server w/o git

From
JFJoe Fiorini <joe@faithfulgeek.org>
Date
Mar 26, 2008, 03:03 UTC
Message-ID
<323B72DF-3387-40ED-8235-213A9FAD6CDD@faithfulgeek.org>
In-Reply-To
<200803252057.38326.robin.rosenberg.lists@dewire.com>

Thanks for all your replies. Unfortunately, I cannot use git apply because I will not have access to git on the server where I'm doing the patch. I will try Jan's suggestion of ignoring whitespace.

-Joe
On Mar 25, 2008, at 3:57 PM, Robin Rosenberg wrote:
Show 22 quoted lines
> Den Tuesday 25 March 2008 19.25.58 skrev Joe Fiorini:
>> 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
>
> You can try git-apply instead of patch. It is a bit smarter (and not
> outsmarting itself either).
>
> -- robin
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Robin RosenbergNext: Jan Hudec
Message 6 of 7 in “Apply patch on server w/o git”
  1. Joe FioriniMar 25, 2008
  2. Bryan DonlanMar 25, 2008
  3. Joe FioriniMar 25, 2008
  4. Jan HudecMar 25, 2008
  5. Robin RosenbergMar 25, 2008
  6. Joe FioriniMar 26, 2008
  7. Jan HudecMar 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.