title: How to correctly undo a bad commit in P4V (Perforce)?
body: <p>Ok, so I am using Perforce P4V to back up my work for a Unity project. One of my teammates checked in some changes to the metafiles which broke everything. No problem though right? That's the whole point of using P4. We can just revert that. Only... revert didn't work?</p>
  <p>The behavior I am seeing is
  File A was changed in changelist 1
  File B was changed in changelist 2,
  File C And A were changed in changelist 3</p>
  <p>Let's say Changelist 3 contains the bad change
  I clicked on changelist 2 in my history, then clicked get revision, and checked the Force Operation box.
  changelist 2 being the last known good state what I expected to happen was to have all of my files restored to the state I was in when changelist 2 was submitted.</p>
  <p>Instead, file C was reverted, but File A was not. It's like, since file A didn't change in changelist 2 it didn't bother to get that version.</p>
  <p>So I am in a state where all of the unity metafiles are maimed and all prefab references are broken.</p>
  <p>When that didn't work I tried using get a revision to go back to the most current state. Then using Backout. That similarly didn't work, metafiles still maimed. I then tried selecting the last known good state and rolling the entire project folder back to that state. Again, didn't work. But then again, I may have maimed my project so badly at that point that nothing would have worked.</p>
  <p>The only way I have found that appears to correctly be reverting the files and restoring the broken links is manually selecting each file or folder and reverting it to the last good commit, which is different for each file/folder since they were added and changed in different commits.</p>
  <p>What I don't understand is why the force get revision didn't do that on its own. Or what the &quot;correct&quot; way to undo a bad commit is.</p>
  <p>I even tried deleting the entire assets folder then using get revision force to pull an entirely new copy from the server using the last known good commit. This appeared to work perfectly once, but when I tried to repeat it to verify my results it went back to losing all of the meta file links. The only dependable way of getting back into a good state appears to be manually force getting each file and folder to the individual last known good commit.</p>
  <p>I have consigned myself to having to manually fix my blunder this time, but I'd really appreciate help to know how to do this the right way for the future.</p>