I wanted git to ignore files that I have already added to the repository. Unfortunately, if a file was added, changing .gitignore does not help. But there are two options:
git update-index --assume-unchanged [filename(s)]
git update-index --skip-worktree [path_to_ignore]
the second tells it to ignore all files below a given path .. a complete directory.
so far this works and I hope I did not mess something up.