P4IGNORE

Specify a list of files that contain lists of rules for ignoring files when adding files to the depot and reconciling workspaces.

Usage Notes

Used by Client? Used by Server? Command-Line Alternative Can be set in P4CONFIG file?

Yes

No

None

Yes

Value if not Explicitly Set

Operating System Value

All

none

Examples

.p4ignore
.p4ignore;$home/.myp4ignore

Notes

Note

You may use $home to set environment variables. For example

P4IGNORE=$home/myignorefile

The syntax for the contents of a P4IGNORE file is not the same as Helix Server syntax. Instead, it is similar to that used by other versioning systems:

For example:

	# 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.

Use the p4 ignores 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 a file.

		$ p4 ignores -v -i mypath