DEV Community

Discussion on: Is it possible to put the

Collapse
 
mostafalaravel profile image
mostafalaravel

my current .gitignore is like :

/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.testing
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.idea/
/public/img/avatars
/public/js
/public/css
Enter fullscreen mode Exit fullscreen mode


`

What should I add exactly ?

Collapse
 
rvxlab profile image
RVxLab

Please re-read my comment, as I explained exactly what you need to do to fix this.

In case you didn’t know, it’s completely fine to have multiple .gitignore files.

Collapse
 
sergeypodgornyy profile image
Sergey Podgornyy
/storage/*
/storage/!.gitignore
Enter fullscreen mode Exit fullscreen mode

and then run git rm -r --cached storage/framework/*

Thread Thread
 
rvxlab profile image
RVxLab

Not wrong. But also not what I said.

In case Mostafa didn’t know, it’s entire possible and legal to have multiple .gitignore files.

Thread Thread
 
sergeypodgornyy profile image
Sergey Podgornyy

Possible, but from my personal experience it is better to have a single .gitignore file to rule them all 🙂