I am having a problem with gitignore in Laravel 5.3.
I have the following gitignore file. I used !
to exclude myfile.json.
node_modules/
public/storage
storage/*.key
/.idea
Homestead.json
Homestead.yaml
.env
SQL/
*.sql
mynotes.md
!storage/app/mydir/myfile.json
When I run git status --ignored
I get this outputs.
Ignored files:
(use "git add -f <file>..." to include in what will be committed)
../.env
../SQL/
../app/.DS_Store
../bootstrap/cache/config.php
../bootstrap/cache/services.php
../mynotes.md
../node_modules/
uploads/.DS_Store
../storage/app/.DS_Store
../storage/app/mydir/
...
...
So myfile.json is ignored. How can I write a gitignore so that I can add/commit a file?