Skip to content

Instantly share code, notes, and snippets.

@jase-perf
Forked from ImLp/p4ignore.txt
Last active July 15, 2025 22:26
Show Gist options
  • Save jase-perf/b15b57d72fa8095c732fdbc4ca948903 to your computer and use it in GitHub Desktop.
Save jase-perf/b15b57d72fa8095c732fdbc4ca948903 to your computer and use it in GitHub Desktop.
Unreal Engine UGS P4 Ignore Example
## This p4ignore file is a combination of Epic's documentation, but
## adjusted to work even if its not in the same folder as the .uproject
## file, and the p4ignore gist from Luis Placid
# The syntax for P4IGNORE files is not the same as Perforce syntax.
# Instead, it is similar to that used by other versioning systems:
#
# - Files are specified in local syntax
# - a # character at the beginning of a line denotes a comment
# - a ! character at the beginning of a line excludes the file specification
# - a * wildcard matches substrings.
#
# For example:
#
# foo.txt Ignore files called "foo.txt"
# *.exe Ignore all executables
# !bar.exe Exclude bar.exe from being ignored
#
# Files generated by visual studio should not be checked in.
*.csproj.*
.vs/*
*.pdb
*.suo
*.opensdf
*.sdf
*.tmp
*.mdb
obj/
*.vcxproj
*.sln
*-Debug.*
# Git generate file structures
.git/
# Ignore JetBrain's IDE folders
.idea/
!.idea/runConfigurations
.gradle/
# Python cache files
__pycache__
*.pyc
# egg-infos
p4util.egg-info
*.egg
# Unix specific generated files should not be checked in.
FileOpenOrder/
*.xcworkspace
*.xcodeproj
./Makefile
./CMakeLists.txt
.ue4dependencies
# Do not check in samples & featurepacks copies provided by the engine.
Samples/*
FeaturePacks/*
Templates/*
Engine/Documentation/*
# Saved files are overwritten by each person. Should not be checked in.
Saved/
# Ignore UBT's configuration.xml
Engine/Programs/UnrealBuildTool/*
*.uatbuildrecord
# Do not save results of local builds. (Locally compiled engine build from source)
LocalBuilds/
# Ignore built binaries and temporary build files
obj/*
*.csprojAssemblyReference.cache
# Intermediates
Intermediate/
# Intermediate folders created for various C# programs
Engine/Source/Programs/*/obj/*
# Saved folders for programs should not be checked in
Engine/Programs/*/Saved/*
Engine/Programs/UnrealBuildTool/*
# Derived data cache should never be checked in
DerivedDataCache/*
# Ignore any build receipts
Engine/Build/Receipts/*
# Ignore personal workspace vars
.p4config.txt
# Ignore Unix backup files
*~
# Ignore Mac desktop services store files
.DS_Store
# Ignore crash reports
crashinfo--*
# Ignore linux project files
*.user
*.pro
*.pri
*.kdev4
# Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
# Ignore documentation generated for C# tools
Engine/Binaries/DotNET/UnrealBuildTool.xml
Engine/Binaries/DotNET/AutomationScripts/BuildGraph.Automation.xml
# Ignore version files in the Engine/Binaries directory created by UBT
Engine/Binaries/**/*.version
# Ignore exp files in the the Engine/Binaries directory as they aren't C/C++ source files
Engine/Binaries/**/*.exp
# Ignore Swarm local save files
Engine/Binaries/DotNET/SwarmAgent.DeveloperOptions.xml
Engine/Binaries/DotNET/SwarmAgent.Options.xml
# Intermediary Files
*.target.xml
*.exe.config
*.exe.manifest
# Ignore autogenerated files from HoloLens WMRInterop
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/*
# Ignore all .code-workspace files
*.code-workspace
@Skylarzz
Copy link

Hi there! I hope you're doing well. It seems like there are a lot of ignore rules. Have these ignores been validated on a large scale and safe enough? Especially the part about modifying Epic's documentation to fit a larger range of paths, could that potentially affect some files unintentionally?

@jase-perf
Copy link
Author

Hi @LakeishaKowalczyk a large part of this ignore file comes from an ignore template by Luis Placid, who created it while he was working at DNEG, which used Unreal and Perforce for a lot of major films and tv shows, so its been pretty well tested and validated there.
As for the stuff added from Epic's documentation, some of their lines assume that the .p4ignore file is placed in a specific location and not just in the root of a workspace.

While there is a small possibility that it could ignore files that you want to submit (though I doubt it) they will still be in your local workspace so you can modify the ignore file to fix that as you go, which is easier to fix than needing to obliterate files off the server that were submitted but shouldn't have been.

@Skylarzz
Copy link

Thanks for your patience, this repository is the best-maintained perforce + unreal setup template I've come across, hope more people can get here to see it.

@jase-perf
Copy link
Author

Thanks so much! I'm glad to hear it is helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment