Comparing two project folders with diff -r is great until it starts reporting every file inside .git. The fix is a single option and I wish I had it in my fingers earlier.
diff -r -x .git -x '*.log' one two
-x PAT (long form --exclude=PAT) skips files and directories whose name matches the pattern. You can repeat it as often as you like. I’d quote the pattern, so the shell doesn’t expand *.log before diff sees it.
Here is a small test. Two folders with a changed src/m.c, a different .git/HEAD, and a notes.log that only exists on one side. Plain diff -r one two printed all three differences: the .git/HEAD change, Only in one: notes.log, and the source file. With the two -x options only the source file was left:
diff -r -x .git -x '*.log' one two
diff -r -x .git -x '*.log' one/src/m.c two/src/m.c
1c1
< x
---
> y
When the list gets long, put the patterns in a file, one per line, and use -X FILE (--exclude-from=FILE). That file is easy to keep next to your notes and reuse.
The exit status is still 1 when something differs, so it keeps working in scripts. One caveat: a pattern matches the name of a file or folder, not a path, so -x src/m.c did not exclude my src/m.c in a test, while -x m.c did. That also means a pattern like m.c skips every file with that name, in any folder.
Further reading: Comparing directories (GNU diffutils manual)