Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dse's avatar
Level 2

git push ignores vendor folder in .gitignore

hi,

i have the /vendor folder in the .gitignore file.

When i use git to deploy my local laravel code to the remote server

with git commit -am "new code" and git push live master

it tries to delete the /vendor folder on the remote system.

I get the following errors back from the git push:

...

remote: error: unable to unlink old 'vendor/symfony/yaml/Tests/YamlTest.php' (Permission denied) remote: error: unable to unlink old 'vendor/symfony/yaml/Unescaper.php' (Permission denied) remote: error: unable to unlink old 'vendor/symfony/yaml/Yaml.php' (Permission denied)

....

Shouldn't it be ignored by the entry in the .gitignore?

Any idea what i am doing wrong, beside using git for deployment? :)

0 likes
0 replies

Please or to participate in this conversation.