# using git-diff as a diff replacement?

3 messages from 2016-02-24 to 2016-02-25. Participants: Jacob Keller, Duy Nguyen.
Thread: https://gitlist.dev/t/41503

## Jacob Keller, 2016-02-24 22:21

Subject: using git-diff as a diff replacement?
Message-ID: <CA+P7+xq7gobJbbRxm51APMQ8408jyvW64=1y3wo3jz3rjMsDqA@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BP7%2Bxq7gobJbbRxm51APMQ8408jyvW64%3D1y3wo3jz3rjMsDqA%40mail.gmail.com

```
Hey,

I know that running "git diff <path> <path>" when outside a git
project will result in a normal diff being run. I happen to prefer the
diff algorithm and diff output of "git diff" but there does not seem
to be a way to have this behavior from within a git tree.

Is there a way to pass an option to git-diff which will result in
strict file comparison?

Thanks,
Jake

```

## Duy Nguyen, 2016-02-25 02:38

Subject: Re: using git-diff as a diff replacement?
Message-ID: <CACsJy8DTKOhOxdiQbRSddMSTMCQAFmZDdm6G1QeY6TpDf2HuKg@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8DTKOhOxdiQbRSddMSTMCQAFmZDdm6G1QeY6TpDf2HuKg%40mail.gmail.com
In-Reply-To: <CA+P7+xq7gobJbbRxm51APMQ8408jyvW64=1y3wo3jz3rjMsDqA@mail.gmail.com>

```
On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
> Hey,
>
> I know that running "git diff <path> <path>" when outside a git
> project will result in a normal diff being run. I happen to prefer the
> diff algorithm and diff output of "git diff" but there does not seem
> to be a way to have this behavior from within a git tree.

git diff --no-index <path> <path>

?
-- 
Duy

```

## Jacob Keller, 2016-02-25 02:43

Subject: Re: using git-diff as a diff replacement?
Message-ID: <CA+P7+xr-OH=nptBS9us5iWKkDr7FX-dfAjJZvBzPkUQ7JPKLzg@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BP7%2Bxr-OH%3DnptBS9us5iWKkDr7FX-dfAjJZvBzPkUQ7JPKLzg%40mail.gmail.com
In-Reply-To: <CACsJy8DTKOhOxdiQbRSddMSTMCQAFmZDdm6G1QeY6TpDf2HuKg@mail.gmail.com>

```
On Wed, Feb 24, 2016 at 6:38 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
>> Hey,
>>
>> I know that running "git diff <path> <path>" when outside a git
>> project will result in a normal diff being run. I happen to prefer the
>> diff algorithm and diff output of "git diff" but there does not seem
>> to be a way to have this behavior from within a git tree.
>
> git diff --no-index <path> <path>
>
> ?
> --
> Duy

Yep thanks.. I swear I did git help diff, but I guess I am blind. This
does what I want, and I had my shell alias diff so I don't forget :D

Thanks,
Jake

```
