Gitignore not ignoring

Sometimes I add a folder to gitignore and the files contained in that folder appear in the list of uncommitted changes, eg:

image

I’m not an experienced git user, so the issue could be with me, but is there a reason for this? Could it be because I added the folder to gitignore when the files were already marked as uncommitted?

Community Page
Last updated: