1. How does ripgrep handle binary files, symlinks, and .gitignore compared to grep?
Show answer
rg skips binary files by default (override with -a or --binary). It respects .gitignore, .rgignore, and .ignore files. Symlinks are not followed by default (use -L/--follow). grep searches everything, follows no ignore files, and includes binary matches. rg uses -g/--glob for include/exclude patterns: rg pattern -g '*.py' -g '!test*'.