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

P4 CLI Documentation | 2025.2

# Options for resolving conflicts

To specify how a conflict is to be resolved, you issue the `p4 resolve` command, which displays a dialog for each file scheduled for resolve. The dialog describes the differences between the file you changed and the conflicting revision. For example:

    C:\bruno_ws> p4 resolve //Acme/dev/jam/command.c
    c:\bruno_ws\dev\main\jam\command.c - merging //Acme/dev/jam/command.c#9

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

The differences between each pair of files are summarized by `p4 resolve`. Groups of lines (chunks) in the `yours`, `theirs`, and `base` files can differ in various ways. Chunks can be:

- Diffs: different between two of the three files: yours, theirs, or base
- Conflicts: different in all three files

In the preceding example:

- Four chunks are identical in theirs and base but are different in yours.
- Two chunks are identical in yours and base but are different in theirs.
- One chunk was changed identically in yours and theirs.
- One chunk is different in yours, theirs, and base.

P4 Server’s recommended choice is displayed at the end of the command line. Pressing Enter or choosing Accept performs the recommended choice.

You can resolve conflicts in three basic ways:

- Accept a file without changing it (see Accepting yours, theirs, or merge)
- Edit the merge file with a text editor (see Editing the merge file)
- Merge changes selectively using a merge program (see Merging to resolve conflicts)

The preceding options are interactive. You can also specify resolve options on the `p4 resolve` command line, if you know which file you want to accept. For details, see Resolve command-line options. To re-resolve a resolved but unsubmitted file, specify the `-f` option when you issue the `p4 resolve` command. You cannot re-resolve a file after you submit it. The following sections describe the resolve options in more detail.

In this section:

Your search for returned results