鍍金池/ 問答/PHP  Linux/ git 切換分支,警告提示 不能刪除vendor目錄

git 切換分支,警告提示 不能刪除vendor目錄

假設當前分支是dev

執(zhí)行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,我自己也沒有添加子模塊。

謝謝~

回答
編輯回答
賤人曾
2017年8月3日 04:03