Should I add a Laravel provider directory to .gitignore or not?

I have a vendor directory in a file .gitignore. Every time I run composer update, git cannot keep track of updates and directory changes vendor, and therefore I cannot undo those changes!

My question is: Is it possible that the application crashes or errors occur after composer update, so there is a need for it git reset?

If possible, is it better to delete the vendor directory from .gitignore? maybe there are other solutions to this problem? (if at all a problem !!)

+4
source share
2 answers

Composer composer.lock.

, composer update .., , composer.lock. .

composer install, composer.lock. , composer install.

: composer dump-autoload vendor.

+5

vendor .gitignore. , composer , composer.json . - , composer.json composer update.

, vendor .gitignore, GitHub/BitBucket ..

+5

Source: https://habr.com/ru/post/1652762/


All Articles