Remember that running the command
git config --global core.excludesfile '~/.gitignore'
will just set up the global file, but will NOT create it.
For Windows check your Users directory for the .gitconfig
file, and edit it to your preferences. In my case It's like that:
[core]
excludesfile = c:/Users/myuser/Dropbox/Apps/Git/.gitignore