Perforce: Add P4Ignore
Set the P4IGNORE Environment Variable
Perforce needs to know where to find the .p4ignore.txt file. On Windows, you must set an environment variable that includes the full absolute path to the .p4ignore.txt file.
Windows:
Open Command Prompt or PowerShell.
Set the
P4IGNOREvariable with the full path:set P4IGNORE=C:\Path\To\Your\.p4ignore.txtTo make this setting persistent, add it to system environment variables:
Open Control Panel > System > Advanced system settings.
Click Environment Variables.
Add a new User Variable with the name
P4IGNOREand the full path to your.p4ignore.txtfile (e.g.,C:\Users\YourUser\.p4ignore.txt).
Note: The .p4ignore file must be a plain text file, and its location must be explicitly referenced in the environment variable. Unlike Git, Perforce does not automatically detect the .p4ignore file within the repository structure.