Ignore files with P4IGNORE

You can configure your workspace to ignore certains files or folders when you add to the depot. These might be automatic backup files, build files, log files, configuration scripts, personal notes, or anything else that you might not want to add to the depot.

The easiest way to set up rules for ignoring file is to create a file named .p4ignore or p4ignore.txt that you save in your workspace.

  1. Add to this file the rules you want. Here is an example:

    # Do not add back-up files to the depot
    *.BAK
    # I don't need temporary files to be under source control
    *.tmp
    # Ignore any PNG files
    *.png
    # Also ignore any files in my Drafts folder
    Drafts\

    where any line that begins with # is a comment you write for yourself.

  2. Click Add. P4V notifies you of the files it will ignore and shows the red + for the files it will add.


  3. Click OK.

  4. Click Submit.

If you want more details and options for rules, or want to create a rules file with a customized name, see the P4IGNORE environment variable in Helix Core Command-Line (P4) Reference.