Git issues - package-lock.json

  • administrators

    Says we have B1 and B2 both are created from master.
    B1 has some updates to package.json.
    B2 has some updates to package.json as well.

    After B1 merged into master, B2 is ready. Submit the pull request, there will be some code conflict due to package-lock.json. It's almost impossible to resolve this.

    Here is what you can do on your local:

    git checkout B2
    git merge origin master

    Yes, you need to resolve the conflict, just accept all current changes on package-lock.json, and carefully resolve the conflicts on package.json and other files. And stage the changes, and then merge the master into B2

    The next step, which is very important, because package-lock.json is not valid now, so simplet remove it and regenerate it by npm install

    Then commit B2 and submit the pull request.