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

P4 CLI Documentation | 2025.2

# Resolve command-line options

The `p4 resolve` options described below enable you to resolve directly instead of interactively. When you specify one of these options in the `p4 resolve` command, files are resolved as described in the following table:

Option | Description
--- | ---
`-a` | Accept the auto-selected file.
`-ay` | Accept yours.
`-at` | Accept theirs. Use this option with caution, because the file revision in your client workspace is overwritten with the head revision from the depot, and you cannot recover your changes.
`-am` | Accept the recommended file revision according to the following logic: If theirs is identical to base, accept yours. If yours is identical to base, accept theirs. If yours and theirs are different from base, and there are no conflicts between yours and theirs, accept merge. Otherwise, there are conflicts between yours and theirs, so skip this file, leaving it unresolved.
`-af` | Accept the recommended file revision, even if conflicts remain. If this option is used, edit the resulting file in the workspace to remove any difference markers.
`-as` | Accept the recommended file revision according to the following logic: If theirs is identical to base, accept yours. If yours is identical to base, accept theirs. Otherwise skip this file.

Example: Automatically accepting particular revisions of conflicting files

Bruno has been editing the documentation files in `/doc` and knows that some of them require resolving. He types `p4 sync doc/*.guide`, and all of these files that conflict with files in the depot are scheduled for resolve.

He then types `p4 resolve -am` and the merge files for all scheduled resolves are generated, and those merge files that contain no line set conflicts are written to his client workspace. He’ll still need to manually resolve any conflicting files, but the amount of work he needs to do is substantially reduced.

Your search for returned results