Symfony 3 gitignore无法正常工作

I have symfony 3.1.6 and git ignore in / project

.idea
/var/cache/*
/var/logs/*
/var/sessions/*
!var/cache/.gitkeep
!var/logs/.gitkeep
!var/sessions/.gitkeep
/app/config/parameters.yml
/app/config/parameters.ini
/app/bootstrap.php.cache
/var/bootstrap.php.cache
/bin/*
!bin/console
!bin/symfony_requirements
/vendor/
/web/bundles/
/web/uploads/
/app/phpunit.xml
/phpunit.xml
/build/
/composer.phar
**/Entity/*~

I unstall plugin for gitignore and all file in directory visible not active

but when run git status

    изменено:                   vendor/autoload.php
    изменено:                   vendor/composer/ClassLoader.php
    изменено:                   vendor/composer/autoload_namespaces.php
    изменено:                   vendor/composer/autoload_psr4.php
    изменено:                   vendor/composer/autoload_real.php
    изменено:                   vendor/composer/installed.json

and twig and swiftmailer bundle from vendor, I dont know why, how to fix this ?

if gitignore is in your root (same as vendor) use this: vendor/* This idnores anything within your vendor directory.

/vendor/ points to dir content but you dont apply file mask (*)

also dont forget commit your .gitignore first