From 22bdcd575b44c805e75a44042efad4c8a2fd8451 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Fri, 19 Oct 2018 10:42:28 +0100 Subject: [PATCH] diff: add -u (unified diff) example (#2462) --- pages/common/diff.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/diff.md b/pages/common/diff.md index 72b6afbed..12f7d9ac6 100644 --- a/pages/common/diff.md +++ b/pages/common/diff.md @@ -10,10 +10,14 @@ `diff -w {{file1}} {{file2}}` -- Compare files, showing differences side by side: +- Compare files, showing the differences side by side: `diff -y {{file1}} {{file2}}` +- Compare files, showing the differences in unified format (as used by `git diff`): + +`diff -u {{file1}} {{file2}}` + - Compare directories recursively: `diff -r {{directory1}} {{directory2}}`