Perforce not syncing files correctly

Perforce keeps track of the files that it thinks that you have on your local workstation. If you delete those files locally (and don't "tell" perforce about it), then Perforce will still think that you have those files. If you want to get them back, you need to "force sync" the files. In p4v, you can use the "Get Revision..." item and in the subsequent dialog, you can check the "force operation" checkbox to tell Perforce to give you all the files again regardless of whether Perforce thinks that you need them.

Just to complete the information, if you ever do want to remove the files locally, you can do so through p4v by choosing the "Remove from Workspace" item. Doing so will remove the files locally as well as tell perforce that you no longer have those files so that next time you sync, those files will be retrieved from the server.


"Get Revision" will update only files that are not opened (checked out) even when "Force Operation" is enabled. You should revert all files marked as checked out in that workspace, and then use "Get Revision" with "Force Operation"


They won't update because according to Perforce you still have the files on your local machine.

You need to use the "Get Revison..." option and enable the "Force Operation" option.

This will tell Perforce to refresh all the files even those it thinks you have the latest version of.


Like other people have mentioned, one solution is to do a "force sync" the entire depot which is basically overwriting everything from server into your local. The downside to this is that it could take a LONG time to finish if you are working on a big depot.

Another alternative is to compare your local workspace with the server, then only force sync the files that are missing from your workspace.

p4 diff -sd //Depot/path/… | p4 -x – sync -f

-sd option: Show only the names of unopened files that are missing from the client workspace, but present in the depot.

There are more options (sa/se/etc.) available if -sd is not what you need. see here.

credits for the command goes to this blog.