I've deleted all the files in my directory. How can I get them back?

PingPing picture PingPing · Mar 21, 2013 · Viewed 18.4k times · Source

I'm new to Perforce and, to be honest, I'm hating it. I had about 20 files in my c:\workspaces\perforce directory and I selected all of them and hit the delete key. They were all checked in before I deleted them. I've been pulling my hair out trying to figure out how to get them back (Perforce is sooooo unintuitive) but there's nothing that stands out to a n00b like me to.
How can I get the latest revisions back into the directory from Perforce?

Answer

dwikle picture dwikle · Mar 21, 2013

You need to do a force sync.

On the command line:

$> p4 sync -f

In the P4V GUI:

  1. Right-click on the directory to update
  2. Select 'Get Revision'
  3. In the dialog, check 'Force operation'
  4. Click 'Get Revision'