Open topic with navigation
Specify a list of files that contain lists of rules for ignoring files when adding files to the depot and reconciling workspaces.
|Used by Client?||Used by Server?||Command-Line Alternative||Can be set in P4CONFIG file?|
You may use
$home to set environment variables. For
The syntax for the contents of a
P4IGNORE file is not the
syntax. Instead, it is similar to that used by other versioning
# character at the beginning of a line denotes a
You can escape the
# comment character with a backslash
\). This allows filenames beginning with
to be ignored.
!character at the beginning of a line line excludes the file specification. These exclusions override rules defined above it in the
P4IGNOREfile, but may be overridden by later rules.
\on Windows) character at the beginning of a line causes the file specification to be considered relative to the
P4IGNOREfile. This is useful when the rule must apply to files at particular depots of the directory tree.
\on Windows) character at the end of a line causes the file specification to only match directories, and not files of the same name.
*wildcard matches substrings. Like the Helix Core wildcard equivalent, it does not match path separators; however, if it is not used as part of a path, the directory scanning nature of the rule may make it appear to perform like the Perforce "
**wildcard matches substrings including path separators. It is equivalent to the Helix Core "
..." wildcard, which is not permitted.
# Ignore .p4ignore files .p4ignore # Ignore object files, shared libraries, executables *.dll *.so *.exe *.o # Ignore all HTML files except the readme file *.html !readme.html # Ignore the bin directory bin/ # Ignore the build.properties file in this directory /build.properties # Ignore all text files in test directories test/**.txt
The first match is used when figuring out what to ignore.
command to get information about why a file is being ignored during add
and reconcile operations. For example, the following command, lets you
know which line of the
P4IGNORE file is being used to ignore
$ p4 ignores -v -i mypath