threads / discuss / 25768

How to apply patches

Subject: How to apply patches

## tl;dr

3 messages between Nov 17, 2010 and Nov 17, 2010.

replies: 2people: 2as markdown or json

Ananth· Nov 17, 2010, 10:00 UTC · lore

Hi, I have created a git repository on a remote site and have created patches there. I have copied the files for the base version using which I had created the patch. However, when I use git apply --check, I get error as patch does not apply. Can anyone please help? I'm stuck at this and is very important for my workflow.

-- 
View this message in context: http://git.661346.n2.nabble.com/How-to-apply-patches-tp5747036p5747036.html
Sent from the git mailing list archive at Nabble.com.
Tay Ray Chuan· Nov 17, 2010, 14:13 UTC · re: Ananth · lore

Re: How to apply patches

Hi,
On Wed, Nov 17, 2010 at 6:00 PM, Ananth <smilewithani@gmail.com> wrote:
> I have copied the files for the base version using which I had
> created the patch.
Did you
  $ git add . # note the <dot>
and
  $ git commit
the destination ("base version") repo before applying?
-- 
Cheers,
Ray Chuan
Ananth· Nov 17, 2010, 15:01 UTC · re: Tay Ray Chuan · lore

Re: How to apply patches

Hi Tay Ray, Thanks for the reply. the problem is now resolved. The problem was that the patches created were in Unix format (only CR) while when I uploaded the patches through FTP site, they were converted to Windows format (CRLF) which was preventing from the patches from getting applied. I changed the files to unix format again and the problem got resolved.

-- 
View this message in context: http://git.661346.n2.nabble.com/How-to-apply-patches-tp5747036p5748001.html
Sent from the git mailing list archive at Nabble.com.

← back to recent threads