diff flags & options
-u, --unified
Output in unified format with context lines.
diff -u old.txt new.txt
diff -u old.txt new.txt > changes.patch
-r, --recursive
Recursively compare any subdirectories found.
diff -r dir1/ dir2/
diff -ru project-v1/ project-v2/
-q, --brief
Report only when files differ, without showing details.
diff -q file1.txt file2.txt
diff -rq dir1/ dir2/
--color
Colorize the output.
diff --color old.txt new.txt
diff -u --color old.txt new.txt
-y, --side-by-side
Output in two columns.
diff -y old.txt new.txt
diff -y -W 120 old.txt new.txt
-w, --ignore-all-space
Ignore all whitespace when comparing lines.
diff -w old.txt new.txt
-B, --ignore-blank-lines
Ignore changes where lines are all blank.
diff -B old.txt new.txt
diff -wB old.txt new.txt