Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

should I include .vs folder in the .gitingore file?

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?

like image 643
qinking126 Avatar asked Apr 04 '16 22:04

qinking126


People also ask

Can you Gitignore .VS folder?

vs folder.

Do you need .VS folder?

vs folder is required by Visual Studio to store opened documents, breakpoints, and other information about state of your solution. We will continue to evaluate it for future releases.

What files should be added to Gitignore?

gitignore should list the names or name-patterns of files that will be found in work-trees when working with your project, but that should not be committed to the project. In other words, it's not OS-specific, it's project-specific.

What happens if I delete .VS folder?

But deleting the . vs folder will not create any impact on the: Solutions and projects. Project Dependencies files.


1 Answers

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.

like image 136
Lukasz Mk Avatar answered Oct 03 '22 13:10

Lukasz Mk