Wednesday, January 24, 2018

tfignore file for .NET developers

I blogged earlier about the existence of the .tfignore file in Team Foundation Server source control similar to the .gitignore file in GIT.

Still they are a lot of developerd who are unaware of the existence of this file.

With the .tfignore file, you can configure which kinds of files are ignored by placing it 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.

Here is a good sample file to get started with:

To automatically generate a .tfignore file

  1. In the Pending Changes page, in the Excluded Changes section, select the Detected link.

    The Promote Candidate Changes dialog box appears.

  2. Select a file, open its context menu, and choose Ignore this local item, Ignore by extension, Ignore by file name, or Ignore by folder.

  3. Choose OK or Cancel to close the Promote Candidate Changes dialog box.

  4. A .tfignore file appears…

Important

This only applies when using a local workspace. Files changed when working in a server workspace will check in without showing as a pending change in Team Explorer.

No comments: