In my case, the .gitignore
file is somehow corrupted. It sometimes shows up OK but sometimes is gibberish. I guess the encoding might be to blame but cannot be sure. To solve the issue, I deleted the file (previously created through echo > .gitgore
in VS Code commandline) and created a new one manually in the file system (Explorer), then added my ignore rules. After the new .ignore
was in place, everything works fine.