Skysplit Skysplit - 1 year ago 77
Git Question

Checkout to another branch with different composer dependencies

So lately I've been developing composer package and I ran into following problem.


had composer dependency on
somepackage: 1.0.0

had composer dependency on
somepackage: 2.0.0

Is it possible to switch between these two branches without removing
directory and
composer update
each time after
git checkout {branch}
? If so, how can I do this?

Answer Source

As it is stated in the documentation, composer.lock is supposed to be committed to repository. I'm afraid you're trying to solve a problem, just because of wrong usage of composer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download