Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude folders when using TFS in vscode?

I am using Visual Studio Team Services extension in VS code for check in. https://marketplace.visualstudio.com/items?itemName=ms-vsts.team

I am now trying to check in change in angular project, but I am annoyed by excluded 16000 files which are from node_modules: enter image description here

How can I exclude those files from source control? In Visual Studio I used .tfignore file, how about vscode?

like image 776
sensei Avatar asked Jun 04 '17 19:06

sensei


People also ask

How do I ignore a folder in GIT Visual Studio?

Visual Studio Git In the Git Changes window, right-click any changed file that you want Git to ignore and choose Ignore this local item or Ignore this extension. Those menu options don't exist for tracked files.


2 Answers

So I followed everything that the others mentioned, but was missing the following, for .tfignore to skip the files:

Place the following in you Visual Studio Code's settings.json file.

"tfvc.restrictWorkspace": true

settings.json location:

File - Preferences - Settings (top right-hand corner(Open Settings (JSON)))

That I found the answer here.

like image 81
Elmer Avatar answered Oct 06 '22 10:10

Elmer


I had the same problem creating a dotnet core 2 cli react project using visual studio code and TFVC. I created a .tfignore file in the root (same place as the .gitignore).

Then I copied the content in the .gitignore file into .tfignore file, save and done...

like image 10
ShaneRoode Avatar answered Oct 06 '22 11:10

ShaneRoode