I have a template file which I've added to my git repository. I'm now making changes to the file for testing but these changes should remain in my working tree and never committed.
I tried adding the file to the exclude list but this has no effect; changes are still visible during an attempt to commit and I have to ignore the file manually every time.
I understand that this is because the file has a history and excluding it would be ambiguous: should it be excluded from reverting to earlier in history, etc.
My question is whether there is a way to mark a file so that I don't accidentally commit it and push it out to a remote repository like github when it's only meant for local testing.