Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git workflow with vendor directory

I have two branches in my git repo master and production. The main difference is that in production, the vendor directory has been checked in and is not present in the .gitignore

My issue is when I switch from production to master

git checkout master

the whole vendor directory gets wipped out.

What are my options?

like image 763
user391986 Avatar asked Nov 30 '13 06:11

user391986


1 Answers

Try a 'skip-worktree' (from git update-index):

git update-index --skip-worktree -- vendor

When on the branch production.
See if, when checking out the master branch, that directory is deleted.

like image 161
VonC Avatar answered Nov 13 '22 00:11

VonC