0

I've committed a file in a folder previously and nothing I put in .gitignore is now ignoring the folder and everything in it. I've tried committing:

.vscode .vscode/ .vscode/* .vscode/**

Even with / at the beginning of each of those... .vscode and its contents keep showing up in git status.

If I commit .vscode/settings.json to .gitignore, the file keeps showing up in status whenever I make a change.

How am I supposed to get git to just start ignoring this folder and all of its contents?

user8865053
  • 101
  • 2
  • 11

1 Answers1

0

.gitignore will only ignore files that are untracked. You would need to first remove the file from version control before git will ignore that path.

git rm -r --cached vcscode
git commit -am 'Untrack /vcscode'

At this point.. changes should not be tracked

Max Friederichs
  • 569
  • 3
  • 13