I want to mark a file to be ignored when I push to the remote repo. The idea is to use it with some files that I will change locally but almost never want to push those changes. e.g. a settings file where I add local test settings. If someone else makes change to the file (usually the architect) then I want to get those on my next fetch/pull and am happy for those to overwrite my local changes.
I have tried putting the file in .git\info\exclude but this does not give me what I want. It ignores the file and gives me errors when I try to switch branch.