Answer the question
In order to leave comments, you need to log in
Is it possible to keep vendor folder in git after composer update?
When using the composer package manager, all the packages necessary for the project are stored in the vendor folder, while the generally accepted practice is that this folder cannot be added to git, instead, each developer after git clone must do composer install and periodically composer update.
I don't like this approach for the following reasons:
Answer the question
In order to leave comments, you need to log in
> others should somehow find out about it in order to update themselves
well, you use the git, right? do you use it right?
git fetch origin
git diff --name-only <yourbranch>..origin/<yourbranch> -- composer.json or whatever
If one developer updated the libraries, others should somehow find out about it in order to update themselves
It's possible, but it doesn't make sense.
Instead, we put composer.lock in the git and hung a git hook that does composer install during merge and checkout.
After that the problem went away.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question