To put *.swp to every project's repositories makes duplicate job.
One way to solve this issue is to put it to Global gitignore.
From this blog Git global ignores, i will copy to here, also.
- Create .gitignore file at somewhere, mostly at ~/
git config --global core.excludesfile ~/.gitignore
- An pattern of file, you want to do global ignore in to that file.
That's it.