Edit the .p4ignore file to ignore files and folders in a workspace

Your project might contain files or folders you do not want to version. P4 One automatically ignores hidden files, such as .DS_Store files on macOS. To exclude other files or file types from versioning, you can indicate for P4 One to ignore them. Ignored files are not included when performing P4 One actions, such as restoring a version or submitting a version to P4.

All workspaces contain a .p4ignore file. This file contains a list of files and folders to ignore when versioning your project.

For examples of ignore files for game engines and common DCC tools, see p4ignore file examples.

To learn more about editing an ignore file, watch this video or review the instructions following the video.

  1. In a text editor, open the .p4ignore file in your P4 One workspace folder.

    An ignore file in a folder affects all files in the folder. Normally, you create an ignore file in your workspace root. You can also have ignore files in subfolders that affect only those folders and their children.
  2. In the file, enter one line for each file path to ignore. Use the examples in p4ignore file examples to get started.

    Remember that:

    • P4 is case-sensitive, so double check your paths to confirm you are using casing consistently.

    • * can be used as a wildcard to match any number of characters.

    • A slash (/) at the end of a path only matches folders. In any other place in the path, it matches files or folders.

    • A ! at the beginning of a line ensures that matched files are not ignored, even if a previous rule matches them.

    • You can use wildcards at the end of a line:

      • Use ... to match any number of characters in any subfolders.

      • Use * as a recursive wildcard to match any number of characters, but no subfolders. Recursive wildcards can affect performance.

  3. Save the ignore file.

To learn more about ignore files, see P4IGNORE in the P4 CLI Reference .

.p4ignore file examples