I have a project in TFS with branches and I want to ignore some folders in each branch.
So I try this to ignore all branches folders, but it's not working:
\Tools\Web\APPREPORTS\Branches\*\node_modules\
\Tools\Web\APPREPORTS\Branches\*\packages\
So it's forcing me to do that in this way, specifing each branch:
\Tools\Web\ALMAREPORTS\Branches\DEV\node_modules\
\Tools\Web\ALMAREPORTS\Branches\DEV\packages\
\Tools\Web\ALMAREPORTS\Branches\STAGE\packages\
\Tools\Web\ALMAREPORTS\Branches\STAGE\node_modules\
\Tools\Web\ALMAREPORTS\Branches\PRODUCTION\packages\
\Tools\Web\ALMAREPORTS\Branches\PRODUCTION\node_modules\
There is another way to simplify that?
Thanks in advance.
Your method is not supported. The * and ? wildcards are supported in the leaf name only. More detailed info from this answer: tfignore wildcard directory segment
It depends which folder you put your .tfignore file in.
You can just use \node_modules
to ignore all files in this folder.
The following rules apply to a .tfignore file:
# begins a comment line
The * and ? wildcards are supported.
A filespec is recursive unless prefixed by the \ character.
! negates a filespec (files that match the pattern are not ignored)
Source: MSDN Documentation