6

I am working on a mvc core application. and files in .vs folder kept giving me problems. I have to merge files in .vs folder every time I checked in. Is it safe to add it in the gitignore file?

qinking126
  • 11,385
  • 25
  • 74
  • 124
  • Possible duplicate of [.vs folder to source control in visual studio 2015?](http://stackoverflow.com/questions/31526899/vs-folder-to-source-control-in-visual-studio-2015) – Shaun Luttin Apr 05 '16 at 00:31

1 Answers1

5

Yes, you can add .vs folder to .gitignore - in fact you should do this on the beginning.

Also - when you create new repository on GitHub - you can use predefined .gitignore file... in your case it can be 'Visual Studio' (included .vs and a lot more):

enter image description here

For myself I always add additional lines to ignore Bower and NPM packages - they are automatically restored, so I see no reason to keep them in Repository (and this is really a lot of files) - unless you want to keep history of changes in these libraries - but that's your choice:

# Lib's
**/wwwroot/lib
node_modules/


BTW: .vs is Visual Studio 'working' folder and is not required for storing solution/project - you can delete it when VS is shutdown and after that VS will recreated it during lunching any solution - of course you loose your working configuration of IDE, but no worries, it's not painful.

Lukasz Mk
  • 7,000
  • 2
  • 27
  • 41