Do you know about .git/info/exclude? It only exists in your local git file so it isn’t shared with a remote repo and achieves this same purpose.
> Don’t use the standard ignore rules (see gitignore[5]), but still use the ignore rules given with -e options from the command line.