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

P4 CLI Documentation | 2025.2

# Changelist-related tasks

To change files in the depot, you open them in a changelist, make any changes to the files, and then submit the changelist. A changelist contains a list of files, their revision numbers, and the operations to be performed on the files. Unsubmitted changelists are referred to as pending changelists.

Submission of changelists is an all-or-nothing operation; that is, either all of the files in the changelist are updated in the depot, or, if an error occurs, none of them are. This approach guarantees that code alterations that affect multiple files occur simultaneously.

P4 Server assigns numbers to changelists and also maintains a default changelist, which is numbered when you submit it. You can create multiple changelists to organize your work. For example, one changelist might contain files that are changed to implement a new feature, and another changelist might contain a bug fix. When you open a file, it is placed in the default changelist unless you specify an existing changelist number on the command line using the `-c` option. For example, to edit a file and submit it in changelist number 4, use `p4 edit -c 4 filename`. To open a file in the default changelist, omit the `-c` option.

You can also shelve changelists in order to temporarily preserve work in progress for your own use, or for review by others. Shelving enables you to temporarily cache files in the shared server without formally submitting them to the depot.

The P4 Server might renumber a changelist when you submit it, depending on other users' activities; if your changelist is renumbered, its original number is never reassigned to another changelist.

You can restrict a changelist from public view by changing the `Type` field from `public` to `restricted`. In general, if a changelist is restricted, only those users with `list` access to at least one of the files in the changelist are permitted to see the changelist description.

To control what happens to files in a changelist when you submit the changelist to the depot, see Configure submit options.

In this section:

Your search for returned results