git different directories between branches

58 Views Asked by At

i'm struggling with the following situation:

There is one directory with two branches: master and L5.4
master uses Laravel 5.3, L5.4 uses Laravel 5.4

Main difference is the Laravel source (within the vendor dir) for version 5.3 and 5.4, ie for the master branch i'd have to use vendor/laravel (5.3) and for the L5.4 branch it would be vendor/laravel (5.4).
But afaik i cannot install both version within the vendor directory, so how can i handle it that?
Could it be that this is only possible using two different directories for both brnaches (as it would be using eg svn) or is there an other possibilty to handle this?

1

There are 1 best solutions below

7
iloo On

vendor/ should not be under source control. What should be different between the two branches is composer.json where you would define specific versions of the required libraries.