We have migrated a project from Mercurial to TFS 2013. The project uses ASP.NET Web API and TypeScript and there are many, many automatically generated files.
Under Mercurial, we used .hgignore
to ignore many .js
and .js.map
and other auto-generated files. This was done using globbing and wild-cards in certain subdirectories.
Under TFS, we have only found how to 'exclude' these files from a commit - we can't find a way to entirely remove them.
The problem with excluding files is twofold: firstly, the exclude-list seems to be reset under certain circumstances and, secondly, if the exclude-list is flooded with these files, it is difficult to use it for its correct purpose: partial commits.
How do you properly exclude files from version control, under TFS?
Team Foundation Server Version Control (TFVC) has a similar mechanism. .tfignore
, with a very silimar syntax to what you're used to. More information can be found on MSDN.
You can also enable the Forbidden patterns check-in policy to ensure that people don't explicitly add files to source control (explicit add overrides .tfignore). It ships as part of the Visual Studio Team Foundation Server Power Tools.