Discard changes made to open files
p4 revert will discard changes made to open files, reverting them to the revisions last p4 sync'd from the depot. This command also removes the reverted files from the pending changelists with which they're associated.
When files that have been opened by p4 delete are reverted, the files are reinstated in the client workspace. Reversions of files that have been opened by p4 add will leave the client workspace files intact. Reversions of files opened through p4 integrate will remove the files from the client workspace.
-c changelist# | Reverts only those files in the specified changelist. To revert files in the default changelist, use the text value default for changelist#. |
g_opts | See global options section. |
Can File Arg Use Revision Specifier? |
Can File Arg Use Revision Range? |
Minimal Access Level Required |
---|---|---|
No | No | open |
To open a file for add | p4 add |
To open a file for deletion | p4 delete |
To copy all open files to the depot | p4 submit |
To read files from the depot into the client workspace | p4 sync |
To list all opened files | p4 opened |
To bring the client workspace in sync with the files that Perforce thinks you have, clobbering open files | p4 sync -f |