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

P4 CLI Documentation | 2026.1

# Edit files and check in changes

You must open a file for edit before you attempt to edit the file. When you open a file for edit—with the `p4 edit` command —P4 Server enables write permission for the file in your workspace and adds the files to a changelist. If the file is in the depot but not in your workspace, you must sync it before you open it for edit.

Example: Open a file for edit

Bruno wants to make changes to `command.c`, so he syncs it and opens the file for edit.

    C:\bruno_ws\dev> p4 sync //Acme/dev/command.c
    //depot/dev/command.c#8 - added as c:\bruno_ws\dev\command.c

    C:\bruno_ws\dev> p4 edit //Acme/dev/command.c
    //Acme/dev/command.c#8 - opened for edit

He then edits the file with any text editor. When he’s finished, he submits the file to the depot with `p4 submit`.

Your search for returned results