Git · Senior · Question 60 of 76
How do you prevent a huge package-lock.json diff from drowning the real change in review?
- ✓Correct answer: Mark it
linguist-generatedin.gitattributes - 2Commit the lockfile in a separate repository
- 3Add the lockfile to
.gitignorefrom now on
Explanation
Attributes can collapse generated files in platform diffs and skip them in git diff, while the lockfile itself stays committed for reproducible installs.