gss5
gss5

Reputation: 163

Excluding directory from Perforce

If I checkin a codebase into perforce, what is the proper way to exclude dirs? I've noticed that deleting the folder from the workspace excludes it from the depot, but is this the proper way?

Thanks

Upvotes: 4

Views: 6910

Answers (2)

Chance
Chance

Reputation: 2699

If you want to avoid the initial checkin, you can mark the entire directory structure for add, but before you checkin, type the following

p4 revert directory_to_remove/....

Other than that, as you and @Mike pointed out, a p4 delete or workspace exclusion would be fine.

Upvotes: 0

Mike O'Connor
Mike O'Connor

Reputation: 3813

If the directories that you want to exclude should not be version controlled at all, then the proper thing to do is delete those directories, which will remove them from the repository.

If those directories do belong in source control, and you just want to exclude them explicitly from your workspace, you can do that by editing your workspace view. For example:

//depot/... //my-workspace/...
-//depot/folder-to-remove/... //my-workspace/folder-to-remove/...

That will exclude folder-to-remove and all its subdirectories from your workspace.

Upvotes: 11

Related Questions