8

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?

zzlalani
  • 22,960
  • 16
  • 44
  • 73
user391986
  • 29,536
  • 39
  • 126
  • 205

1 Answers1

4

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250