Git ignore file after commit

--

Disini saya menghapus pada baris “/vendor” yang terdapat pada file .gitignore tetapi setelah menghapus baris tersebut dan melakukan git push, folder “/vendor” masih tidak terpush.

/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log

agar folder vendor dapat terpush ke branch, maka lakukanlah langkah dibawah ini :

git rm -r --cached .
git add .
git commit -m 'clear git cache'
git push

dengan begitu folder vendor dapat terpush juga..

--

--