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

P4 CLI Documentation | 2025.2

# Full list of resolve options

The `p4 resolve` command offers the following options:

Option | Action | Remarks
--- | --- | ---
`?` | Help | Display help for `p4 resolve`.
`a` | Accept automatically | Accept the auto-selected file: 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.
`ae` | Accept edit | If you edited the merge file (by selecting `e` from the `p4 resolve` dialog), accept the edited version into the client workspace. The version in the client workspace is overwritten.
`am` | Accept merge | Accept merge into the client workspace as the resolved revision. The version in the client workspace is overwritten.
`at` | Accept theirs | Accept theirs into the client workspace as the resolved revision. The version in the client workspace is overwritten.
`ay` | Accept yours | Accept yours into the client workspace as the resolved revision, ignoring changes that might have been made in theirs.
`d` | Diff | Show diffs between merge and yours.
`dm` | Diff merge | Show diffs between merge and base.
`dt` | Diff theirs | Show diffs between theirs and base.
`dy` | Diff yours | Show diffs between yours and base.
`e` | Edit merged | Edit the preliminary merge file generated by P4 Server.
`et` | Edit theirs | Edit the revision in the depot that the client revision conflicts with (usually the head revision). This edit is read-only.
`ey` | Edit yours | Edit the revision of the file currently in the workspace.
`m` | Merge | Invoke the command `P4MERGE` base theirs yours merge. To use this option, you must set `P4MERGE` to the name of a third-party program that merges the first three files and writes the fourth as a result.
`s` | Skip | Skip this file and leave it scheduled for resolve.

The merge file is generated by the P4 Server, but the differences displayed by `dy`, `dt`, `dm`, and `d` are generated by your computer’s diff program. To configure another diff program to be launched when you choose a `d` option during a resolve, set `P4DIFF`. For more details, see Diff files.

Example: Resolving file conflicts

To resolve conflicts between his work on a Jam `README` file and Gale’s work on the same file, Bruno types `p4 resolve //Acme/dev/jam/README` and sees the following:

    Diff chunks: 0 yours + 0 theirs + 0 both + 1 conflicting
    Accept(a) Edit(e) Diff(d) Merge (m) Skip(s) Help(?) e: e

Bruno sees that he and Gale have made a conflicting change to the file. He types `e` to edit the merge file and searches for the difference marker `>>>>`. The following text is displayed:

Copy

    Jam/MR (formerly "jam - make(1) redux")
    /+\
    &gt;&gt;&gt;&gt; ORIGINAL README#26
        +\ Copyright 1993, 1997 Christopher Seiwald.
    ==== THEIRS README#27
        +\ Copyright 1993, 1997, 2004 Christopher Seiwald.
    ==== YOURS README
        +\ Copyright 1993, 1997, 2005 Christopher Seiwald.
    &lt;&lt;&lt;&lt;
        \+/

Bruno and Gale have updated the copyright date differently. Bruno edits the merge file so that the header is correct, exits from the editor and types `am`. The edited merge file is written to the client workspace, and he proceeds to resolve the next file.

When a version of the file is accepted during a resolve, the file in the workspace is overwritten, and the new client file must still be submitted to the depot. New conflicts can occur if new versions of a file are submitted after you resolve but before you submit the resolved files. This problem can be prevented by locking the file before you perform the resolve. For details, see Locking files.

Your search for returned results