Git 作曲家:奇怪的行为

Git 作曲家:奇怪的行为,git,composer-php,gitignore,Git,Composer Php,Gitignore,我对这位作曲家是个新手。然而,我一直在使用它没有任何问题,直到现在。我的问题是,每次运行composer update或安装供应商文件夹下的所有文件时,都会进入git中的未跟踪列表。我还有一个.gitignore来防止“供应商”被跟踪,但显然没有做应该做的事情。下面是我的.gitignore文件 # phpunit itself is not needed phpunit.phar # local phpunit config /phpunit.xml # ignore sub directo

我对这位作曲家是个新手。然而,我一直在使用它没有任何问题,直到现在。我的问题是,每次运行composer update或安装供应商文件夹下的所有文件时,都会进入git中的未跟踪列表。我还有一个.gitignore来防止“供应商”被跟踪,但显然没有做应该做的事情。下面是我的.gitignore文件

# phpunit itself is not needed
phpunit.phar
# local phpunit config
/phpunit.xml

# ignore sub directory for dev installed apps and extensions
/apps
/extensions

#custom
runtime/
web/

/vendor

!vendor/dixonsatit/
!vendor/dixonsatit/yii2-agency-theme/dist/img/
!vendor/dixonsatit/yii2-agency-theme/dist/css/

任何提示都会有帮助。

首先提交当前更改,然后在顶部文件夹上运行以下命令:

git rm -r --cached .
git add .
git commit -m "fixed untracked files"

我以前确实运行过这些命令,它似乎有效,这意味着所有供应商文件都未被跟踪。但当我运行composer安装/更新时,供应商文件又回来了。