Some times you dont want to add something to .gitignore, while it would be nice that there is some .gitignore-local version by default, there is not, so you need to find a different way to do this, the way to do is this. Go to .git/info/exclude file and edit it like regular .gitignore file, add files/folders you want to ignore.
Another command you should run is this, as probably git already shows your file in git status and you want it to be removed, so do this, after this you can change this files without a problem
git update-index --assume-unchanged [<file>...]