Unfortunately, my .gitignore file or certain commands in it get completely ignored.
When I check out a branch or from remote or pull/fetch, the .vscode folder is always removed, so that all my tasks get lost and I have to create .vscode folder with the tasks.json file inside again and again manually.
How can I fix the problem without overwriting or deleting my current branches? If these (currently 3 branches) are deleted, the consequences would be really bad.
This is my current .gitignore file. For the folder .vscode I have already tried different approaches and, for example, removed the lines with the exclamation marks, etc. Still does not work.
My .gitignore file ist placed in the root folder of an angular 7 project and I'm using visual studio code.
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
*.iml
.settings/
# misc
/.sass-cache
/connect.lock
/coverage
npm-debug.log
testem.log
/typings
# e2e
/e2e/*.js
/e2e/*.map
# System Files
.DS_Store
Thumbs.db
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json