Hacker News new | ask | show | jobs
by kstrauser 823 days ago
Git doesn't use the output of `diff` to determine whether anything has changed.
1 comments

True, although not widely known it would seem.

It does use diff to generate patches, however. I know in today's GitHub-dominated landscape, that's considered a bit of a dusty feature, but it would be a pity to break it.

If you want to generate patches rather than look at local differences, there's a specific command for that - https://git-scm.com/docs/git-format-patch