# How to apply patches

3 messages from 2010-11-17 to 2010-11-17. Participants: Ananth, Tay Ray Chuan.
Thread: https://gitlist.dev/t/25768

## Ananth, 2010-11-17 10:00

Subject: How to apply patches
Message-ID: <1289988042359-5747036.post@n2.nabble.com>
URL: https://gitlist.dev/e/1289988042359-5747036.post%40n2.nabble.com

```

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, 2010-11-17 14:13

Subject: Re: How to apply patches
Message-ID: <AANLkTinR5Z60u5DYzgzuB0x7CmA8kVR04nLDJ4csDZJK@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinR5Z60u5DYzgzuB0x7CmA8kVR04nLDJ4csDZJK%40mail.gmail.com
In-Reply-To: <1289988042359-5747036.post@n2.nabble.com>

```
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, 2010-11-17 15:01

Subject: Re: How to apply patches
Message-ID: <1290006076573-5748001.post@n2.nabble.com>
URL: https://gitlist.dev/e/1290006076573-5748001.post%40n2.nabble.com
In-Reply-To: <AANLkTinR5Z60u5DYzgzuB0x7CmA8kVR04nLDJ4csDZJK@mail.gmail.com>

```

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.

```
