Ignore files and folders

You can exclude specific files, folders, and file types from deliveries, for example, backup files or built artifacts.

Overview

To exclude items, you define ignore rules in a .dmignore file. Each folder has a single .dmignore file, but you can have multiple ignore files across a hierarchy of folders. You can also apply ignore rules recursively. For example, you can ignore all .tmp files in the current folder and all child folders.

Rules are color-coded when you edit them using the Dimensions CM context menu Ignore Rules option:

  • Recursive rules: blue

  • Regular rules: black

  • Comments: green

  • Clear: magenta

You can edit ignore rules in any text editor, but they are not color coded there.

Guidelines for ignore rules:

  • On Windows, rules are not case-sensitive. On Linux, they are case-sensitive.

  • You can use the following wildcards:

    Asterisk (*) Represents one or more characters.
    Question mark (?) Represents one character.
  • To place .dmignore files under source control, deliver them to a project/stream. To use the same ignore rules with other work areas, fetch the .dmignore files.

    Example: In this example, there is a .dmignore file at the root of a stream, but you only update an empty work area from a subfolder. When you deliver changes, the file is missing, and its ignore rules are not applied. To apply the rules, fetch the .dmignore file from the stream, or create a copy locally.

  • In wizards where you deliver changes, you can optionally disable ignore rules. For example, you may want to deliver all files, including those that you do not normally need to control.

  • To edit .dmignore files in a language that corresponds to your locale, on your machine check the language settings for non-Unicode programs.

  • Ignore rules are not the same as the include and exclude local files filters in the Merge, Synchronize, and Deliver wizards. Ignore rules apply only to local files, while include and exclude filters apply to any kind of change.

  • To use ignore rules with the web client, you must use Web Client Tools.

  • You can also ignore items when you run a shelving operation.

Back to top

Use ignore rules

Use the following rules to ignore uncontrolled files and folders.

Rule Description
<folder name>

Ignores a specific folder. For example, to ignore the foo folder:

foo

<file name>

Ignores a specific file. For example, to ignore the f.tmp file:

f.tmp

*.<file extension>

Ignores all files with a specific extension. For example, to ignore files with the .tmp extension:

*.tmp

r:*.<file extension>

Recursively ignores all files with a specific extension starting from the location of the current .dmignore file. For example, to recursively ignore all .tmp files in the current folder and all child folders:

r:*.tmp

r:<folder or file name>

Recursively ignores a specific file or folder. For example, to ignore all Debug folders in the work area hierarchy, add the following rule to a .dmignore file in the work area root:

r:Debug

:<comment>

To add a comment, start a line with a colon (:), for example:

:This is a comment that does not affect the ignore rules

To add an inline comment after a rule, prefix it with a colon, for example:

r:Debug :My comment about this rule

c:

Clears all recursive rules inherited from parent .dmignore files.

For example, if a parent ignore file includes r:*.xml, and you add c: to the current ignore file, then all .xml files in the current folder and its child folders are not ignored.

c:<specific rule>

Clears a specific, inherited recursive rule.

For example, if you have the rule r:*.pdb in a work area root and do not want to apply it to the current subfolder and child folders, add the following rule to the .dmignore file in the subfolder:

c:*.pdb

?

Use the question mark symbol (?) as any single wildcard character in a file or folder name or extension.

For example, to recursively ignore all work area files with extensions .PK3 and .PK4:

r:*.pk?

Back to top

Ignore files and folders

You can apply ignore rules to one or more files or folders.

To ignore files and folders:

  1. In Windows Explorer, navigate to the folder where you want to ignore files and/or folders.

  2. Select one or more items.

  3. Right-click, select Dimensions > Ignore Rules, and select one of these options:

    Option Description
    Ignore <file/folder name> Ignores a specific file or folder.
    Ignore <file/folder name> recursively Ignores a specific file or folder recursively.
    Ignore all selected Ignores all selected files and folders.
    Ignore all selected recursively Ignores all selected files and folders recursively.
    Ignore *.<file extension> Ignores all the selected file types.
    Ignore *.<file extension> recursively Ignores all the selected file types recursively.

The appropriate ignore rules are added to the .dmignore file. You do not need to add them manually.

Back to top

Edit ignore rules

If you have the Dimensions CM plugin for Windows Explorer installed, use the following procedure to add or change ignore rules.

Without the Windows Explorer extension, you need to create a .dmignore. file. The file must have a leading and a trailing dot (.).

To add or modify an ignore rule:

  1. In Windows Explorer, select the folder where you want to edit ignore rules.

  2. Right-click, select Dimensions > Ignore Rules, and select Edit .dmignore.

  3. Add and modify ignore rules.

Back to top

Cancel recursive ignore rules

If you have the Dimensions CM plugin for Windows Explorer installed, use the following procedure to cancel recursive ignore rules.

To cancel a recursive ignore rule:

  1. In Windows Explorer, select the folder where you want to cancel all recursive ignore rules inherited from parent ignore files.

  2. Right-click, select Dimensions > Ignore Rules, and select Edit .dmignore.

  3. Enter c:.

Back to top

See also: