Skip to main content
Tweeted twitter.com/super_user/status/1373197638116511750
Better wording
Source Link
miphe
  • 1k
  • 2
  • 8
  • 20

I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

That givesAbove code shows me all differencesthe difference between those files, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to a file)?

OSX (10.7.5)

I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

That gives me all differences, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to a file)?

OSX (10.7.5)

I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

Above code shows me the difference between those files, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to a file)?

OSX (10.7.5)

Better sentences.
Source Link
miphe
  • 1k
  • 2
  • 8
  • 20

In OSX (10.7.5) terminal, I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated info) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

That gives me all differences, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to onea file, but two different files.)?

OSX (10.7.5)

In OSX (10.7.5) terminal, I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated info) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

That gives me all differences, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to one file, but two different files.)?

I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

That gives me all differences, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to a file)?

OSX (10.7.5)

Source Link
miphe
  • 1k
  • 2
  • 8
  • 20

How can I enable colored output for OSX diff?

In OSX (10.7.5) terminal, I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated info) and I would like some colored output, how can I achieve that?

$ diff file_1 file_2

1,9d0
< <script ... >
<     // more code
< </script>

$ 

That gives me all differences, however without any colors. For longer diffs that is hard to read.


Alternatively, is there a way for git (with which I do have nice color output) to diff two different files (not changes to one file, but two different files.)?