Before reconfiguring the global excludes file, you might want to check what it's currently configured to, using this command:
git config --get core.excludesfile
In my case, when I ran it I saw my global excludes file was configured to
~/.gitignore_globaland there were already a couple things listed there. So in the case of the given question, it might make sense to first check for an existing excludes file, and add the new file mask to it.