Should .p4ignore and .gitignore be the same?

Hello,

I’m beginning a new C++ Unreal project, and for it I’m setting up a Perforce server.

I’ve had some trouble finding an end-all .p4ignore file. So my question is, can I simply declare my .p4ignore to be equal to my .gitignore supplied by GitHub in my P4CONFIG and be done with it? Would this be ideal when working with a team?

Has anyone out there done a similar setup?

Cheers.

As well, does one need both a .p4ignore and a P4 Typemap?

They little diffrent. P4 unlike git ignore system is local and each user need to configure the target ignore file in there local workplace configuration. So you can’t just upload ignore file to repository and expect other user to use it like you can do it with git. Usally when i work with P4 i manually add files and directories and i just don’t put anything that should not be in the repo, so ignore file are useful only if you do batch adding.

As i know P4 typemap defines how type is treated by the repo, like for example either as text or binary.

Hey , thanks for the info.

So do most collaborators work in Unreal with Perforce without bothering with a .P4ignore or is it sometimes worth it for everyone to configure it in their workspaces?

They don’t need to, just inform them to add individual files they want to add to repo and don’t add anything from Intermediate, Saved etc. I worked that way 2 times and it was fine. You can work same way with Git too, but having ignore file is extra protection for junk not getting in, P4 setting that is little more pain.