Perforce not syncing files correctly

前端 未结 7 868
广开言路
广开言路 2021-01-01 11:10

I\'m using Perforce P4V, the graphical tool, to interface with my Perforce server here at work. I have a project I added to the depot and I accidentally deleted it from my

7条回答
  •  臣服心动
    2021-01-01 11:56

    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.

提交回复
热议问题