git 切换分支,警告提示 不能删除vendor目录

发布于 2022-09-06 04:09:05 字数 928 浏览 14 评论 0

假设当前分支是dev

执行git checkout master

提示如下,

warning: unable to rmdir vendor/monolog/monolog: Directory not empty
warning: unable to rmdir vendor/nesbot/carbon: Directory not empty
warning: unable to rmdir vendor/psr/log: Directory not empty
warning: unable to rmdir vendor/ramsey/uuid: Directory not empty
warning: unable to rmdir vendor/symfony/polyfill-mbstring: Directory not empty
warning: unable to rmdir vendor/symfony/translation: Directory not empty
Switched to branch 'master'
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
  (use "git pull" to update your local branch)

vendor目录,是composer生成的,在 master分支下是没有的。

ps:用sourcetree,在dev分支拉取代码,会提示
fatal: No url found for submodule path 'vendor/monolog/monolog' in .gitmodules

我开始以为是子模块配置有问题,但是在项目根目录下,没有找到.gitmodules,我自己也没有添加子模块。

谢谢~

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文