git merge --no-ff account-creation
自动 merge package-lock.json 冲突(内容):package-lock.json 中的 merge 冲突 自动 merge 失败;修复冲突,然后提交结果。
关于这个问题有什么想法吗?
最佳答案
根据 docs :
Resolving lockfile conflicts
Occasionally, two separate npm install will create package locks that cause merge conflicts in source control systems. As of
npm@5.7.0
, these conflicts can be resolved by manually fixing anypackage.json
conflicts, and then runningnpm install [--package-lock-only]
again. npm will automatically resolve any conflicts for you and write a merged package lock that includes all the dependencies from both branches in a reasonable tree. If--package-lock-only
is provided, it will do this without also modifying your localnode_modules/
.To make this process seamless on git, consider installing
npm-merge-driver
, which will teach git how to do this itself without any user interaction. In short:$ npx npm-merge-driver install -g
will let you do this, and even works with pre-npm@5.7.0
versions of npm 5, albeit a bit more noisily. Note that ifpackage.json
itself conflicts, you will have to resolve that by hand and runnpm install
manually, even with the merge driver.
关于git - 自动 merge package-lock.json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50160311/