.gitignore not working

So I have my changed (deleted) files in .gitignore (by right clicking add to .gitignore) but they still show up under changed files how can I stop the files from showing up?

You need to commit the deletion first. You cannot ignore files that are still part of HEAD.

1 Like

Sorry, I don’t quite understand you I want to delete the files on my system but have the files remain for everyone else.

You can’t do that with .gitignore. git sparse-checkout should be able to do what you want: Git - git-sparse-checkout Documentation

Note that it is marked as experimental, and also that those files will still be in the history (including in your .git directory).

1 Like