英文:
Installing a npm pack on two different branches
问题
我在一个名为BRANCH 1的分支上有一个 npm pack。我需要在另一个分支BRANCH 2上使用相同的包,但是BRANCH 1仍然没有通过代码审查阶段,因此尚未合并,而从“master”拉取也不可行。
问题相当简单:我可以在BRANCH 2上安装相同的包而不会出现任何问题吗?
英文:
I have a npm pack on a branch that we will call BRANCH 1. I need the same pack on a different branch, BRANCH 2, but BRANCH 1 still hasn't pass the code review phase, so it isn't merged yet and a pull from "master" isn't practicable.
The question it's pretty easy: can I install the same pack on BRANCH 2 without any problem?
答案1
得分: 0
你可以。受影响的文件是 package.json
、package-lock.json
。如果你不想修改这些文件,可以使用 --no-save
安装。然后,在第一个分支合并后,从主分支更新你的第二个分支。
英文:
You can. The files affected are package.json
, package-lock.json
. If you don't want to touch these files you could install with --no-save
. Then update your second branch from the master when the first branch is merged.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论