这是一个场景,我的同事已经将他的node_modules文件夹推送到远程仓库。
在我的电脑上,我运行了"npm_install"命令来安装所有必需的依赖项。现在,当我尝试同步远程仓库以获取新更改时,我收到了这个消息:
Cannot pull because there are uncommitted changes.
Commit or undo your changes before pulling again. See the Output window for details.
在更改选项卡中:我的 node_modules 目录已包含。因此,我需要将其忽略。
我尝试了以下操作:
- 在 tsconfig.ts 中添加:"exclude": ["node_modules"]
- 将 "node_modules" 添加到 gitignore 中。
我应该怎么做才能解决这个问题?为什么选项对我没有起作用?