PhpStorm 2022.2 Help

Set up a local Mercurial repository

Although Mercurial provides high flexibility in arranging data and your work with repositories, the following scenarios are most commonly used for setting up a local Mercurial repository:

  • Clone an existing remote repository and create a new project with the downloaded data.

  • Create a local repository which you can push to a remote location later, if necessary.

Clone a remote Mercurial repository

  1. From the main menu, select Hg | Get from Version Control.

    The Get from Version Control dialog opens.

  2. In the dialog that opens, select Mercurial from the Version control list and specify the URL of the remote repository you want to clone.

  3. Click Clone. If you want to create a PhpStorm project based on the sources you have cloned, click Yes in the confirmation dialog.

Create a local Mercurial repository

  1. Open the project you want to store in a repository.

  2. From the main menu, choose Hg | Create Mercurial Repository.

  3. Specify the location of the new repository.

    When the repository has been created, you will see a notification.

  4. Put the required files under Mercurial version control. The uncommitted files appear in the Commit to <branch name> tab of the Commit tool window (Alt+0).

    Note that if you specify Mercurial as the version control system for a directory in the Version Control dialog, PhpStorm will suggest to put each new file in this directory under Mercurial control.

Last modified: 01 August 2022