PhpStorm 2016.1 Help

Resolving Text Conflicts

If a conflict occurs in a file under Subversion, the conflict markers are added to the conflicting file, and three auxiliary unversioned files are created in your working copy:

  1. filename.mine: the copy of your local file without conflict markers.
  2. filename.rOld: the base revision you have last synchronized to.
  3. filename.rNew: the latest version on the server.

Conflicting files are displayed in red in the Local Changes tab of the Version Control tool window. In the Update Info Tab of the Version Control tool window, they are grouped in a Merged with conflicts list and also displayed in red.

With PhpStorm, you can resolve conflicts in two ways:

  • Semi-automatically, using a merge tool.
  • Manually in the editor. After that, you need to manually mark the processed files as conflict-free.

In this section:

To resolve a text conflict using the merge tool

  1. In the Local Changes tab of the Version Control tool window, select the conflicting file:
    img
  2. On the main VCS menu, or on the context menu of the selection, choose Subversion | Resolve Text Conflict. Files Merged with Conflicts dialog box appears.
  3. If you want to accept the server version and overwrite your local changes, click Accept Theirs. If you want to force your changes to the repository, click Accept Yours. Clicking Merge opens the merge tool, where you can accept or discard each change individually. So doing, the file is automatically marked as resolved, and auxiliary files are deleted.
  4. Once the conflicts are successfully resolved, commit your local version to the repository.

To resolve a text conflict manually

  • Open the conflicting file in the editor, and do one of the following:
    • Edit the contents within the conflict markers as required.
    • Copy one of the auxiliary files on top of your working file.

To mark a file as resolved

  1. Do one of the following:
    • Select the file in the Project tree or in the Local Changes tab of the Version Control tool window, and choose Subversion, and then choose Mark Resolved on the context menu of the selection.
    • With the conflicting file opened in the editor, right-click the mouse anywhere in the editor tab. On the context menu choose Subversion, and then choose Mark Resolved.
    • On the main menu, choose VCS | Subversion | Mark Resolved..
  2. In the Mark Resolved dialog box, that opens, select the check box next to the name of the file in question.
  3. Click the Mark Resolved button.

See Also

Last modified: 12 July 2016