Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 8
    yay for git diff
    – chrismarx
    Commented Feb 4, 2015 at 19:33
  • 13
    git diff should be at the top of your answer! +1 for pointing out that it works even outside of a repository. Commented Feb 7, 2015 at 18:26
  • 7
    'git diff' does not work on generic files so aliasing diff to be 'git diff' can be harmful Commented Apr 23, 2015 at 23:13
  • 1
    This doesn't work for me... echo one > foo; echo two > bar; git diff foo bar produces no output, while diff foo bar produces 1c1 < one --- > two (with proper formatting, of course)
    – LarsR
    Commented Nov 23, 2016 at 8:04
  • 1
    git diff doesn't work for e.g. pipes Commented Jan 24, 2018 at 15:49