How to modify the default global .ignore for VS2012?

Jun 14, 2012 at 2:06 AM

VS2012 generates some files that I don't want to commit, e.g. *.opensdf, *.sdf, ..., etc. and I have to add these files for every project. Is it possible to modify the default .ignore file? Thanks for your great work. =)

Jun 14, 2012 at 5:59 PM

From what I saw the default gitignore file is hard-coded in the source. Having the possibility to edit it would be cool. Meanwhile updating the hard-coded definition to this version https://github.com/github/gitignore/blob/master/Global/VisualStudio.gitignore would at least solve more cases.

Jun 14, 2012 at 6:28 PM

you can copy the file VisualStudio.gitignore to C:\Users\<you name>\.gitignore and run the following command in git bash:

git config --global core.excludesfile ~/.gitignore

Jun 17, 2012 at 7:11 AM
yysun wrote:

you can copy the file VisualStudio.gitignore to C:\Users\<you name>\.gitignore and run the following command in git bash:

git config --global core.excludesfile ~/.gitignore

Dear yysun and PedroClipri.

I don't know how to build Git Scource Control Provider myself, so I tried yysun's method and it works. Thanks very much for both of your help. =)