Don't want to see package-lock.json
and yarn.lock
in your git diff
? Here are two nifty aliases that hide these files from your diff.
alias gd="git diff -- :!package-lock.json :!yarn.lock"
alias gds="git diff --staged -- :!package-lock.json :!yarn.lock"
You can also add entries to a
.gitattributes
file within your repo to exclude them from any diff output. This has the benefit of working every time git produces a diff, and not just when you use your alias.