How does gitignore work?

I have a Plasmic Nextjs build and I see 139 next files in my changes to commit, yet I have a gitignore with:

# Next.js build output
.next
out

any clues?

did you try to restart vscode?

Yes, but will try again just incase.

Didn’t work. I get a fresh batch

do you have any other rules inside .gitignore file? If yes, do these rules work as expected?

Yes I have .yarn/cache which helped reduce 100s.
But .next/cache has no effect

~also, I think you have to add / after .next to have it like this .next/~

did you try this?
https://github.com/vercel/next.js/issues/2948#issuecomment-329346447

Not yet. I’ll try that

git rm -r --cached .next
generated deleted staging files, do I commit?

Committed and no more files :smile:. Thx so much @impressive_cardinal :pray: