Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / Self-Hosting & Infra

diff and patch Cookbook: Unified Diffs, Dry Runs, Reverse Patches, Rejects and Whitespace Noise

Self-Hosting & Infra beginner 5 min read $0.01 Updated 2026-10-20

Tested GNU diff and patch: exit status 1 for differences, unified format headers, patch applying and reversing, dry-run checking, a failed hunk producing .rej and .orig, diff -q, process substitution, and --strip-trailing-cr.

Compare files, share changes as a patch, apply them safely with --dry-run, undo with -R, and understand what .rej and .orig files mean. Includes exit codes and CRLF line-ending noise.

Read the full guide

The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.

Open in the Knowledge Base Agent API →