1

When I add a file to .gitignore changes in file are still tracked in Visual Studio Code.

The file is in the root where is .gitignore file added by VSC and file that should be ignored is entred in the .gitignore file by the VSC. The file name is bs-config.js

node_modules
vendor
bs-config.js
package-lock.json

.gitignore file

Am I missing something?

phd
  • 82,685
  • 13
  • 120
  • 165

2 Answers2

0

The system will ignore what you put inside .gitignore but if you already commit some file that you want ignore you should remove from the git repository, or committing a deletion

F.Guerinoni
  • 277
  • 2
  • 12
0

You will be tracking changes within the .gitignore file, thats why you see those blue bars. that means your git instance is tracking changes in the .gitignore file. The files you add to .gitignore like your bs-config.js will be greyed out in VSCode's explorer view to let you know its untracked.

tHeSiD
  • 4,587
  • 4
  • 29
  • 49