Add files to a local Mercurial repository
After a Mercurial repository for a project is initialized, you need to add the project data to it:
If you have specified enabled Mercurial for your project, JetBrains Rider suggests putting each new file under Mercurial control during the file creation.
You can add all unversioned files to Mercurial control or select files to add.
Open the Commit tool window .
Right-click the Unversioned Files node and choose Add to VCS from the context menu.
Click Commit or press .
Open the Commit tool window .
Expand the Unversioned Files node, select the files to be added. From the context menu, choose Add to VCS.
tip
You can also add files to VCS from the Explorer tool window : right-click the files that you want to add and select Mercurial | Add.
Click Commit or press .
In JetBrains Rider, you can run commit checks, upload files to a server after the commit, or commit with advanced options.
Open the Commit tool window and click
in the bottom-right corner.
Select the necessary options:
In the Before Commit area, select the actions you want JetBrains Rider to perform before committing the selected files to the local repository.
The following options are available:
Reformat code: perform code formatting according to the code formatting rules.
Rearrange code: rearrange your code according to the file and type layout preferences.
Optimize imports: remove redundant import statements.
Cleanup: batch-apply quick-fixes from code cleanup inspections. Click Choose profile to select a profile from which the IDE will run inspections.
In the Advanced Commit Checks area, the following options are available:
Run advanced checks after a commit is done: enable this option to run the selected advanced commit checks after a commit is done.
With this option enabled, if some of the advanced commit checks fail, the changes will be committed anyway.
note
Note that if you want to Commit and Push () your changes right away, the checks will be done before the commit.
Also, this option is not available for the modal commit interface.
Check TODO: Review the TODO items matching the specified filter. Click Configure to choose an existing TODO filter, or open the TODO settings page and define a new filter to be applied.