P4 ignore - keep unwanted files out of the depot
There are some files that you never want to checkin to Perforce (e.g. tmp files, large derived files). The recommended way to do this is via a P4 ignore file.
P4 ignore file
Set the environment variable P4IGNORE to start using a p4 ignore file. You can use a local file or point at a central ignore file, e.g.:
export P4IGNORE=.p4ignore
export P4IGNORE=/myproj/config/p4ignore
You can also set P4IGNORE in the P4CONFIG file
The P4IGNORE file contains a list of patterns that identify files which should never be added to Perforce. The pattern syntax is the same as used in git ignore files.
See the Perforce documentation for a detailed description of P4IGNORE
Template P4IGNORE file
VersIC includes a template P4IGNORE file in $VSC_INSTALL_DIR/config/perforce/.p4ignore
# Perforce sample P4IGNORE file# P4 config files
.p4ignore
.p4config# OA/cds backup and temp files
*.cdslck*
*-
*.oacache# Other backup and temp files
*.bak
*~
*#
*%