days. This makes pull requests a little noisy since I
have to skip over the generated output in the
dist folder to review the
actual source changes in
I recently stumbled across this Thoughtbot
post that showed how to
suppress diffs for certain files on GitHub using a
.gitattributes file, and I
wondered if it would work for this use case. As it turns out, it does.
To start, create a
.gitattributes file in your repository root if you don’t already
have one and add the following line:
Now make a change to something in your
src/ folder that will change the
generated output in
dist/ and push your changes up to a new branch on GitHub.
You’ll see something like this:
Here’s to a little more efficient code review.