Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.tfignore is not ignoring files

I have a .tfIgnore file like below whihc is already checked-in

\xx.Phoenix.Web\bower_components
\xx.Phoenix.Web\node_modules
*.autogen.cs

I would expect that everyfile which is match with .autogen.cs be ignored. But the problem is when files are generated by t4 templates, file are shown in pending changes, see below picture, xx.autogen.cs is recognized as add

enter image description here

even I tried below but still not working

Phoenix\Domain\Entities\*.autogen.cs

and

\Phoenix\Domain\Entities\*.autogen.cs

We are using Vs2013 + Tfs2017

like image 239
Reza Avatar asked Mar 01 '17 16:03

Reza


People also ask

How to ignore files in TFS?

Add files to the server - Azure ReposGo to your Source Control Explorer and navigate to the excluded file. From there right-click on the file and delete it. Go to the Included Changes in Pending Changes and navigate to the excluded file. From there right-click on the file and select Exclude.

How do I insert a Tfignore file?

If you have a local workspace, you can add a new file and in the bottom of the pending changes window you have the changes you can 'promote'. In that window, you can right click the files to automatically add them to a . tfignore file that will be created for you.


2 Answers

Go to Source Control Explorer and delete the folder or file which you want to ignore.

like image 134
Abdullah Nurum Avatar answered Oct 27 '22 12:10

Abdullah Nurum


First, please make sure your .tfignore file created without any problem. This file does not have any suffix. Details of how to take a look at my reply in this question.

Also check if the files already in source control. If they are, .tfignore won't apply to them.

A way to solve the issue is updating your VS to VS2015Update 3. The .tfignore should be working correctly. You could give a try with this version which have some improvements with tfignore.

More ways for handling the issue you can refer this blog from GitHub: Things in ".tfignore" still are shown in pending changes

like image 40
PatrickLu-MSFT Avatar answered Oct 27 '22 10:10

PatrickLu-MSFT