When you get a merge conflict in
package-lock.json, the best way to resolve it is to simply regenerate the
- Do a
git fetch. Here’s what this done: your local repo has cached values for the branch pointers on the remotes (e.g.
origin, which is typically the repo on GitHub).
git fetchupdates these branch pointers.
- Checkout your feature branch
git checkout feature-branch
- Update your feature branch:
git pull origin feature-branch
- Delete the old
- Regenerate it with
- Add it to a new commit with
git add package-lock.json
git commit -m "your-initials update package-lock.json"
git push origin feature-branch
This should resolve the merge conflict. If it doesn’t, you can ask the course staff for help.