Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# Revert files, to discard changes

To remove an open file from a changelist and discard any changes you made, issue the `p4 revert` command. When you revert a file, P4 Server restores the last version you synced to your workspace. If you revert a file that is open for add, the file is removed from the changelist but is not deleted from your workspace.

Example: Revert a file

Bruno decides not to add his text files after all.

    C:\bruno_ws\dev> p4 revert *.txt
    //Acme/dev/docs/manuals/installnotes.txt#none - was add, abandoned
    //Acme/dev/docs/manuals/requirements.txt#none - was add, abandoned

To preview the results of a revert operation without actually reverting files, specify the `-n` option when you issue the `p4 revert` command.

Your search for returned results