Saturday, November 6, 2010

Perforce file exclusion

There are file types and folders I don’t want to see in a source control repository. These are user-specific settings, temporary folders and binaries. There is a simple client-side way to exclude these files and folders. Just add the following lines to your workspace definition:

Pattern Description
-//depot/.../*.suo //WORKSPACE/.../*.suo
Solution user options file.
-//depot/.../bin/... //WORKSPACE/.../bin/...
Generated binaries.
-//depot/.../obj/... //WORKSPACE/.../obj/...
Object files.
-//depot/.../*.user //WORKSPACE/.../*.user
User settings. Can contain useful information, e.g. startup parameters.