您好,我刚刚按照 HelixCore 指南为我的 UE5 项目添加并设置了 .p4ignore(https://help.perforce.com/helix-core/quickstart-unreal/current/Content/quickstart/game-set- up-create-ignore-file.html)。我正在测试“保存”文件夹是否被忽略,但当我重新协调整个项目的离线工作时,它仍然被添加到更改列表中。
这是 .p4ignor 文件中的内容
# User-specific folders or temporary files that should not be versioned.
Saved/
Intermediate/
DerivedDataCache/
FileOpenOrder/
obj/
# Certain file types that should not be versioned.
*.pdb
*-Debug.*
# Visual Studio user settings files that should be ignored.
.vs/
这是我在命令行窗口中检查文件夹是否被忽略时得到的结果
Microsoft Windows [Version 10.0.19045.5011]
(c) Microsoft Corporation. All rights reserved.
c:\Projects\Unreal\WhipLash 5.3>p4 ignores -i -v Saved
c:\Projects\Unreal\WhipLash 5.3\Saved ignored by c:\Projects\Unreal\WhipLash
5.3\.p4ignore:67:Saved/*
c:\Projects\Unreal\WhipLash 5.3>
我还包括
p4 reconcile Saved/...
的结果
c:\Projects\Unreal\WhipLash 5.3>p4 reconcile Saved/...
//stream/PlayerController/Saved/AutoScreenshot.png#39 - opened for edit
//stream/PlayerController/Saved/Config/CrashReportClient/UECC-Windows-919D94EF4F7338AE9E6D99915C03C756/CrashReportClient.ini#1 - opened for delete
//stream/PlayerController/Saved/Config/CrashReportClient/UECC-Windows-9A5108A643D6A95CDA1FF888F286194D/CrashReportClient.ini#1 - opened for delete
//stream/PlayerController/Saved/Config/WindowsEditor/EditorPerProjectUserSettings.ini#63 - opened for edit
//stream/PlayerController/Saved/Config/WindowsEditor/Engine.ini#37 - opened for edit
//stream/PlayerController/Saved/Logs/WhipLash-backup-2024.10.30-22.35.05.log#1 - opened for delete
//stream/PlayerController/Saved/Logs/WhipLash-backup-2024.11.03-20.05.43.log#1 - opened for delete
//stream/PlayerController/Saved/Logs/WhipLash.log#63 - opened for edit
//stream/PlayerController/Saved/Logs/WhipLash_2-backup-2024.10.31-12.24.13.log#1 - opened for delete
//stream/PlayerController/Saved/Logs/WhipLash_2-backup-2024.10.31-12.29.07.log#1 - opened for delete
从 reconcile 命令的输出来看,问题似乎在于您在设置 .p4ignore 文件之前已将这些文件提交到软件仓库。 (因为文件被标记为
edit
和 delete
而不仅仅是 add
)。一旦文件被 Helix Core 跟踪,即使添加到忽略文件中,它也会继续被跟踪,这就是为什么在项目初始提交之前进行设置很重要。
您可以采取两个步骤来解决此问题,但应再次忽略它们。
Obliterate Files...
这将从服务器中完全删除这些文件的所有历史记录,这正是本例中您想要的。Read Only
框,然后单击“确定”。这会将所有这些文件重置为可写,这正是虚幻引擎所期望的。您还应该检查应忽略的其他文件夹并执行相同的操作,因为其他文件夹似乎可能最终会出现在那里。
因为你的
p4 ignores -i -v Saved
命令看起来不错,所以我认为忽略文件本身没有任何问题,只是这些文件在就位之前就已经提交了。
希望有帮助!