3

Is there any way to remove the files/Directories from Excluded Changes in TFVC for Visual Studio Code. I have configured Team Foundation Server in Visual Studio Code and it takes too much time to load because each and every time it check the changes of all the files in folders node_modules ,dist. I found it detect more than 4K files. I have to remove these directories.

Tore Østergaard
  • 3,702
  • 3
  • 25
  • 39
  • From the command line, you can use the [`tf.exe scorch`](https://stackoverflow.com/a/46786149/21567) command. Having that said, you do realize that you may still "need" this files to build/run your application, do you? So deleting them may only be a temporary relief. – Christian.K Feb 13 '18 at 07:01
  • Maybe [Richard Banks' answer](https://stackoverflow.com/questions/922798/how-to-ignore-files-directories-in-tfs-for-avoiding-them-to-go-to-central-source#21102343) can help you? – HaaLeo Feb 13 '18 at 08:28
  • Hi @Christian.K. Thanks for your reply. You are right I don't want to delete I just have to remove it from the TFS pending check in list. From Visual Studio I have also added the ".tfignore" file its working fine with Visual Studio but for Visual Studio Code its not working. – Dhrumil Shah Feb 13 '18 at 08:56
  • Hi @HaaLeo , I have already applied that added ".tfignore" file and added the directory which I didn't want to commit its working well in visual studio but not working for visual studio code extension TFSVC. – Dhrumil Shah Feb 13 '18 at 09:01

1 Answers1

0

Try to add files.exclude in workspace settings:

  1. Go to File > Preferences > Settings

  2. Add files.exclude to the settings.json

For example:

 "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true
  },

You could refer to cases below:

How do I hide certain files from the sidebar in Visual Studio Code?

How can I exclude a directory from Visual Studio Code "Explore" tab?

Cece Dong - MSFT
  • 25,734
  • 1
  • 13
  • 30