The recent version of .gitignore
for Visual Studio projects can be found here:
https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
It contains filenames like *.pfx
etc. Also make sure that there is no Certificate Password set in .csrpoj