🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Resolving Merge Conflicts: all 15 questions

Quiz: Resolving Merge Conflicts · Question 10 of 15

package-lock.json has a conflict after a merge. What is the usual safe approach?

package-lock.json has a conflict after a merge. What is the usual safe approach?

  1. A.Edit the lock file by hand line by line
  2. B.Delete package.json
  3. C.Resolve package.json first, then regenerate the lock file with npm install
  4. D.Always accept "ours" without checking package.json
Answer & explanation

Correct answer: Resolve package.json first, then regenerate the lock file with npm install

Lock files are generated; regenerating them from the resolved package.json gives a consistent result.

Can you get the rest right without peeking?

Take the timed Quiz: Resolving Merge Conflicts quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →