You can configure which kinds of files are ignored by placing text file called .tfignore
in the folder where you want rules to apply. The effects of the .tfignore
file are recursive. However, you can create .tfignore
files in sub-folders to override the effects of a .tfignore file in a parent folder.
To create the file, the easiest way is using the auto automatically generated .tfignore file, follow below steps:
- In the Pending Changes page, in the Excluded Changes section, choose
the Detected changes link.

The Promote Candidate Changes dialog box appears.
- Select a file, open its context menu, and choose Ignore this local
item, Ignore by extension, Ignore by file name, or Ignore by folder.

- Choose OK or Cancel to close the Promote Candidate Changes dialog
box.
- A .tfignore file appears in the Included Changes section of the
Pending Changes page. You can open this file and modify it to meet
your needs.

More info please check the Customize which files are ignored by version control from MSDN Link:Add files to the server