I'm not sure what you mean by "undo" the change. You can remove the core.excludesfile
setting like this:
git config --global --unset core.excludesfile
And of course you can simply edit the config file:
git config --global --edit
...and then remove the setting by hand.