Answer the question
In order to leave comments, you need to log in
What to do with vendor when switching branches?
There is a master branch with composer.json, composer.lock and vendor which is itself excluded from git.
Created a new branch, updated json and lock. As a result, Vendor has changed a lot and is no longer functional in the master branch.
Since I have to switch from branch to branch very often, this leads to a bunch of additional steps, either copying the vendor-backup folder, or running composer Install every time, which is incredibly annoying. Is there any easier way to solve this?
Answer the question
In order to leave comments, you need to log in
Make several vendor_branchname folders, and instead of the vendor folder, a symlink to one of them.
When switching branches, change the symlink. This can be automated by writing a post-checkout hook , for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question