In .gitattributes, add diff=generated to generated files so one conveniently can configure git diff to ignore them, for example by marking them as "binary files" (git config diff.generated.binary true). This should not impact how GitHub renders such diffs.
Suggestion stolen from @zware on Discord 😎