Edit the .p4ignore file to ignore files and folders in a workspace
Your project might contain files or folders you do not want to version. P4 One automatically ignores hidden files, such as .DS_Store files on macOS. To exclude other files or file types from versioning, you can indicate for P4 One to ignore them. Ignored files are not included when performing P4 One actions, such as restoring a version or submitting a version to P4.
All workspaces contain a .p4ignore file. This file contains a list of files and folders to ignore when versioning your project.
For examples of ignore files for game engines and common DCC tools, see p4ignore file examples.
To learn more about editing an ignore file, watch this video or review the instructions following the video.
-
In a text editor, open the .p4ignore file in your P4 One workspace folder.
An ignore file in a folder affects all files in the folder. Normally, you create an ignore file in your workspace root. You can also have ignore files in subfolders that affect only those folders and their children. -
In the file, enter one line for each file path to ignore. Use the examples in p4ignore file examples to get started.
Remember that:
-
P4 is case-sensitive, so double check your paths to confirm you are using casing consistently.
-
*can be used as a wildcard to match any number of characters. -
A slash (
/) at the end of a path only matches folders. In any other place in the path, it matches files or folders. -
A
!at the beginning of a line ensures that matched files are not ignored, even if a previous rule matches them. -
You can use wildcards at the end of a line:
-
Use
...to match any number of characters in any subfolders. -
Use
*as a recursive wildcard to match any number of characters, but no subfolders. Recursive wildcards can affect performance.
-
-
-
Save the ignore file.
To learn more about ignore files, see P4IGNORE in the P4 CLI Reference .
.p4ignore file examples
## Universal P4IGNORE for Unreal Engine Projects and common DCC tools
## Works with both game projects and custom engine source
## Optimized pattern usage based on Perforce P4IGNORE documentation
## This p4ignore file should be named .p4ignore or p4ignore.txt and
## placed in the workspace root, which should be where the Engine and
## project folders are located.
# The syntax for P4IGNORE files is not the same as Perforce syntax.
# Key differences from .gitignore:
# - A / at the start means "relative to this p4ignore file"
# - A / at the end means "directories only"
# - * matches substrings but NOT path separators (like P4 wildcard)
# - ** matches substrings INCLUDING path separators (like P4 "..." wildcard)
# - ! at the start excludes the file specification
###############################################################################
# Visual Studio Solution and Project Files
###############################################################################
# Ignore root Visual Studio solution files only
/*.sln
/*/*.sln
# Visual Studio temp files (but exclude when .pdb is in folder path)
.vs/
*.pdb
!*.pdb/
*.suo
*.opensdf
*.sdf
*.tmp
*.mdb
obj/
*.vcxproj
# User-specific Visual Studio files
*.csproj.user
*.csproj.cache
*.csproj.nuget.*
*.csproj.AssemblyReference.cache
# Note: DO NOT ignore *.csproj.props - these are shared build configuration files
# Built binaries and temporary build files
obj/
*.csprojAssemblyReference.cache
###############################################################################
# Git Integration (if migrating from Git)
###############################################################################
.git/
.gitignore
.gitattributes
.gitmodules
.tgitconfig
###############################################################################
# JetBrains IDEs
###############################################################################
.idea/
!.idea/runConfigurations
.gradle/
###############################################################################
# Python
###############################################################################
__pycache__/
*.pyc
*.egg-info/
###############################################################################
# Unix/Mac Specific
###############################################################################
FileOpenOrder/
*.xcworkspace/xcuserdata/
*.xcodeproj/xcuserdata/
*.xcodeproj/project.xcworkspace/xcuserdata/
.ue4dependencies
*~
.DS_Store
###############################################################################
# Unreal Engine - Core Ignores
###############################################################################
# Samples, FeaturePacks, Templates at root only
/Samples/
/*/Samples/
/FeaturePacks/
/*/FeaturePacks/
/Templates/
/*/Templates/
# Saved and Intermediate directories (generated content)
# These can be at any depth, so use **/
**/Saved/
**/Intermediate/
# Derived Data Cache - use specific patterns to avoid matching source code
**/DerivedDataCache/Boot.ddc
**/DerivedDataCache/**/*.udd
**/DerivedDataCache/
!**/Source/**/DerivedDataCache/
# Personal workspace configuration
.p4config.txt
.p4sync.txt
# Crash reports
crashinfo--*
# Linux project files
*.pro
*.pri
*.kdev4
# Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
Binaries/**/*.dSYM
Binaries/**/*.dsym
# VSCode workspace files
*.code-workspace
# UGS folder (per-workspace)
.ugs/
# Local builds
/LocalBuilds/
!ArchiveForUGS-Perforce/
###############################################################################
# Engine-Specific Paths
# Use **/ prefix so these work whether Engine is at root or nested
###############################################################################
# UnrealBuildTool logs and configuration
**/Engine/Programs/UnrealBuildTool/*.txt
*.uatbuildrecord
# Build receipts
**/Engine/Build/Receipts/
# C# program intermediates and saved folders
**/Engine/Source/Programs/*/obj/
**/Engine/Programs/*/Saved/
# Documentation tools output
**/Engine/Binaries/DotNET/UnrealBuildTool.xml
**/Engine/Binaries/DotNET/AutomationScripts/BuildGraph.Automation.xml
# Version files created by UBT
**/Engine/Binaries/**/*.version
# Export files (linker-generated, not source)
**/Engine/Binaries/**/*.exp
# Swarm local save files
**/Engine/Binaries/DotNET/SwarmAgent.DeveloperOptions.xml
**/Engine/Binaries/DotNET/SwarmAgent.Options.xml
# HoloLens WMRInterop autogenerated files
**/Engine/Source/ThirdParty/WindowsMixedRealityInterop/packages/
**/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/Generated Files/
**/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/x64/
**/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInteropHoloLens/ARM64/
**/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/x64/
**/Engine/Source/ThirdParty/WindowsMixedRealityInterop/MixedRealityInterop/ARM64/
###############################################################################
# DCC Application Autosave and Temporary Files
# Using specific extensions and patterns to avoid catching legitimate files
###############################################################################
# Blender - specific extensions only
*.blend1
*.blend2
*.blend@
untitled.blend
# Autodesk Maya
*.ma.swatches
*.mb.swatches
*_incrementalSave_*.ma
*_incrementalSave_*.mb
incrementalSave/
scenes/edits/
# Autodesk 3ds Max
*.max.bak
autoback/
MaxStart.max
# Cinema 4D
*.c4d.zip
*.c4d~
# Houdini
*.hip.bak
*.hipnc.bak
*.hiplc.bak
# ZBrush
*.ZTL.bak
*.ZPR.bak
QuickSave*
# Substance Painter/Designer
*.spp.bak
*.sbs.bak
*.sbsar.bak
# Adobe Creative Suite - full extensions to avoid false matches
*.psd~
*.ai~
*.indd~
*.fla~
*.aep~
*.prproj~
Adobe After Effects Auto-Save/
Adobe Premiere Pro Auto-Save/
Photoshop Temp*
# Audio Applications
# Pro Tools
*.ptx~
*.ptf~
Session File Backups/
# Reaper
*.rpp-bak
*.rpp~
# Logic Pro
*.logic/Alternatives/
*.logic/Backups/
# Cubase/Nuendo
*.cpr.bak
*.npr.bak
# Ableton Live
*.als~
# FMOD
*.fspro.bak
*.fspro~
# Wwise
*.wproj.bak
*.wsettings.bak
# General DCC patterns (specific directory names only)
.mayaSwatches/
# Unity Files and Folders to ignore
Library/
Temp/
Obj/
Build/
Builds/
UserSettings/
MemoryCaptures/
Logs/
Assets/AssetStoreTools/
Assets/AddressableAssetsData/*/*.bin*
Assets/StreamingAssets/aa.meta
.collabignore
# Build files to ignore
*.apk
*.unitypackage
# Gradle cache directory
.gradle
# Autogenerated project files
/Assets/Plugins/Editor/JetBrains*
.vs
ExportedObj/
.consulo
*.csproj
*.unityproj
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta