UE4 SVN/P4(Perforce) commit filter
程序员文章站
2022-03-25 15:01:13
...
UE4 的 SVN/P4 服务器目录只需保存 Config、Content(Collection、Developer 子目录可忽略)、Plugins、Source、.uproject 即可。
【SVN】
1、打开SVN客户端-----常规设置------全局忽略样式,替换:
Binaries Intermediate Saved launcher.sln .vs DerivedDataCache Collections Developers *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__ *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db
注意:添加时注意最开头的字符与已有配置之间的空格区分。
2、在工程根目录提交验证签入情况,“Binaries Intermediate Saved launcher.sln .vs DerivedDataCache Collections Developers” 文件/文件夹已被过滤。
【Perforce】
在工作区的根目录中创建 p4ignore.txt 文件并写入以下过滤:
# a list of file or directory names to be ignored in
# Ignore .p4ignore files
.p4ignore
# Ignore directories
Binaries
Intermediate
Saved
DerivedDataCache
Collections
Developers
# files
*.sln
*.vs
# do not ignore this
!README.md
# Ignore .p4ignore files
.p4ignore
# Ignore directories
Binaries
Intermediate
Saved
DerivedDataCache
Collections
Developers
# files
*.sln
*.vs
# do not ignore this
!README.md
在命令行中,将P4IGNORE
环境变量设置为指向它(确保使用绝对路径):
p4 set P4IGNORE=E:\ue4-xxx\p4ignore.txt
执行完此操作后,任何添加忽略列表中文件或目录都将被拒绝。
参考:
https://community.perforce.com/s/article/1282
https://www.perforce.com/perforce/doc.current/manuals/p4guide/Content/P4Guide/less_common.files.ignore.html
https://community.perforce.com/s/article/6510
https://zhk.me/696.html