Rider Help

lib_VCS

Control repositories synchronously This option only becomes available if you have a multirooted project, i.e. there are several repositories within a single project.

Select this option if you want branch operations (such as checkout, merge, etc.) to be applied synchronously to all repositories within your project.

  • Soft: The modified files will not be changed, and the differences will be staged for commit.
  • Mixed: The modified files will not be changed, and the differences will be unstaged. This mode is used by default and is identical to the git reset command.
  • Hard: The modified files will be reverted to the selected commit, and all uncommited changes will be lost.
  • Keep: The modified files will be reverted to the selected commit, but local changes will be preserved.
  • Password. If this option is selected and you have two-factor authentication enabled in your GitHub account settings, you will be asked to enter an authentication code each time Rider requires you to log in to your GitHub account.
  • Token (recommended by GitHub for authentication from third-party applications, as it does not require Rider to remember your password).

For projects with Git or Mercurial integration enabled, Rider scans project directories to check if there are Git /Mercurial repositories that are not controlled by the IDE. If such repositories are found, they are listed here under Unregistered roots and are marked grey. To add an unregistered root, select it in the list and click the Add button /help/img/idea/2017.2/new.png.

Rider also checks if registered roots are valid, i.e. that a Git /Mercurial repository exists at the specified path. If invalid repositories are detected, they are marked with red.

Host Specify the URL of your GitHub repository. Login In this text box, type your GitHub logon name. This field is only available if Password is selected as authentication method above. Password In this text box, type your GitHub account password. This field is only available if Password is selected as authentication method above. Sign up Click this link to open the Sign up for GitHub page where you can create a GitHub account. Token Specify your personal access token. This field is only available if Token is selected as authentication method above.
  • Merge: choose this option to have the merge strategy applied. The result is identical with that of running git fetch ; git merge or git pull --no-rebase.
  • Rebase: choose this option to have the rebase strategy applied. The result is identical with that of running git fetch ; git rebase or git pull --rebase.
  • Branch Default: choose this option to have the default command for the branch applied. The default command is specified in the branch.<name> section of the .git/config configuration file.
/help/img/idea/2017.2/arrowUp.png/help/img/idea/2017.2/arrowDown.png Previous Difference / Next Difference Shift+F7 F7
Use these buttons to jump to the next/previous difference.

When the last/first difference is hit, Rider suggests to click the arrow buttons F7/Shift+F7 once more and compare other files, depending on the Go to the next file after reaching last change option in the Differences Viewer settings.

This behavior is supported only when the Differences Viewer is invoked from the Version Control tool window.

/help/img/idea/2017.2/comparePreviousFile.png
/help/img/idea/2017.2/compareNextFile.png Compare Previous/Next File
Alt+LeftAlt+Right Click these buttons to compare the local copy of the previous/next file with its update from the server. /help/img/idea/2017.2/icon_show_paths.png Go To Changed File N/A Click this button to display all changed files in a current change set (and navigate to them). /help/img/idea/2017.2/edit.png Jump to Source
F4 Click this button to open the selected file in the active pane in the editor. The caret will be placed in the same position as in the Differences Viewer. Viewer type
/help/img/idea/2017.2/diffViewer_type.png
Use this drop-down list to choose the desired viewer type. The side-by-side viewer has two panels; the unified viewer has one panel only.

Both types of viewers enable you to

  • Edit code. Note that one can change text only in the right-hand part of the default viewer, or, in case of the unified viewer, in the lower ("after") line, i.e. in your local version of the file.
  • Perform the Apply/Append/Revert actions.
Whitespace
/help/img/idea/2017.2/diffViewer_whitespaces.png
Use this drop-down list to define how the differences viewer should treat white spaces in the text.
  • Do not ignore: white spaces are important, and all differences are highlighted. This option is selected by default.
  • Trim whitespaces: ("\t", " "), if they appear in the end and in the beginning of a line.
    • If two lines differ in trailing whitespaces only, these lines are considered equal.
    • If two lines are different, such trailing whitespaces are not highlighted in the By word mode.
  • Ignore whitespaces: white spaces are not important, regardless of their location in the source code.
  • Ignore whitespaces and empty lines: the following entities are ignored:
    • all whitespaces (as in the 'Ignore whitespaces' option)
    • all added or removed lines consisting of whitespaces only
    • all changes consisting of splitting or joining lines without changes to non-whitespace parts.
      For example, changing a b c to a \n b c is not highlighted in this mode.
Highlighting mode
/help/img/idea/2017.2/diffViewer_highlight.png
Select the way differences granularity is highlighted.
The available options are:
  • Highlight words: the modified words are highlighted
  • Highlight lines: the modified lines are highlighted
  • Highlight split changes: if this option is selected, big changes are split into smaller 'atomic' changes.
    For example, A \n B vs. A X \n B X will be treated as two changes instead of one.
  • Do not highlight: if this option is selected, the differences are not highlighted at all. This option is intended for significantly modified files, where highlighting only introduces additional difficulties.
/help/img/idea/2017.2/collapseAll.png Collapse unchanged fragments Click this button to collapse all unchanged fragments in both files. The amount of non-collapsible unchanged lines is configurable in the Diff & Merge settings page. /help/img/idea/2017.2/sync_scrolling.png Synchronize scrolling Click this button to simultaneously scroll both differences panes; if this button is released, each of the panes can be scrolled independently. /help/img/idea/2017.2/cogwheel_blue_with_arrow.png Editor settings Click this button to invoke the list of available settings. Select or clear this options to show or hide whitespaces, line numbers and indent guides, to use or disable the use of soft wraps, and to set the highlighting level.

These commands are also available from the context menu of the differences viewer gutter.

Include into commit Alt+I This checkbox only appears if you invoke the Differences Viewer from the Commit Changes dialog with multiple changed files (all of which are deselected), and you explore the differences between them and hit the last difference in a file.

Select this checkbox if you want to include the file you've reviewed into the commit.

/help/img/idea/2017.2/moveToOtherChangelist.png Move to Another Changelist Ctrl+R, O This button only appears if you invoke the Differences Viewer from the Commit Changes dialog with multiple changed files (all of which are deselected), and you explore the differences between them and hit the last difference in a file.

Click this icon to move the file you've reviewed to another changelist.

/help/img/idea/2017.2/external_tool.png Show diff in external tool Click this button to invoke an external differences viewer, specified in the External Diff Tools settings page.

This button only appears on the toolbar when the Use external diff tool option is enabled in the External Diff Tools settings page.

N/A Annotate

This option is only available from the context menu of the gutter.

Use this option to explore who introduced which changes to the repository version of the file in question, and when. The annotations view lets you see detailed information for each line of code, such as the version from which this line originated, the ID of the user who committed this line, and the commit date.

You can configure the amount of information displayed in the annotations pane.

For more details on annotations, refer to Viewing Changes Information

/help/img/rider/2017.1/icon_help.png Help
F1 Click this button to show the corresponding help page. Ctrl+Tab Use this keyboard shortcut to switch between the panes of the Differences viewer. The active pane has the cursor. /help/img/idea/2017.2/icon_InsertReplace.png/help/img/idea/2017.2/icon_InsertReplace2.png Use these chevron buttons to apply differences between panes (in case of the side-by-side viewer) or between lines (in case of the unified viewer).

The chevron buttons can change their behavior:

  • Click /help/img/idea/2017.2/icon_InsertReplace.png/help/img/idea/2017.2/icon_InsertReplace2.png to apply changes. This behavior is the default one.
  • Press Ctrl to change /help/img/idea/2017.2/icon_InsertReplace.png /help/img/idea/2017.2/icon_InsertReplace2.png to /help/img/idea/2017.2/arrowRightDown.png or /help/img/idea/2017.2/arrowLeftDown.png and append changes.
Ctrl+Shift+D Use this keyboard shortcut to show the popup menu of the most commonly user diff commands. Ctrl+Tab Use this keyboard shortcut to switch between the left and the right panes. Ctrl+Shift+Tab Use this keyboard shortcut to select the position obtained by Ctrl+Tab in the opposite pane. Ctrl+Z/Ctrl+Y Use this keyboard shortcut to undo/redo a merge operation. Conflicts will be kept in sync with the text.

Note that the options listed above are available for text files only. Rider cannot compare binary files, so most commands will be unavailable for them.

Invoke the Branches menu as described in Accessing Git Branches Popup Menu.

Toolbar

ItemTooltip and ShortcutDescriptionAvailable in
/help/img/idea/2017.2/icon_showDiff.png Show Differences
Ctrl+D
Click this button to open the Differences dialog box that highlights the differences between your local working copy of the selected file and its repository version. All VCSs
/help/img/idea/2017.2/refresh.png Refresh Changes
Ctrl+Alt+R
Click this button to reload the Changed files tree view so it is up-to-date. All VCSs
/help/img/idea/2017.2/show_unversioned_icon.png Show Unversioned Files Click this button if you want to see newly added files that have not been added to version control yet under the Unversioned Files node. ALl VCSs
/help/img/idea/2017.2/add.png Add to VCS
Ctrl+Alt+A
Click this button to move the files selected under the Unversioned Files node to the active changelist, so that they are added to your version control system during the commit. All VCSs
/help/img/idea/2017.2/moveToOtherChangelist.png Move to Another Changelist
Ctrl+R, O
Click this button to add the selected file(s) to another changelist. The Move to Another Changelist dialog box opens where you can select an existing changelist or create a new one. All VCSs
/help/img/idea/2017.2/delete.png Delete Click this button to delete the selected file.
/help/img/idea/2017.2/properties.gif Ignore Click this button to leave the selected files unversioned. All VCSs
/help/img/idea/2017.2/rollback.png Revert Click this button to revert all changes made to the local working copy of the selected files. All VCSs
/help/img/idea/2017.2/edit.png Jump to source
F4
Click this button to open the source code of the selected file in the editor.All VCSs
/help/img/idea/2017.2/vcsToolbarRevertUnchangedIcon.png Revert Unchanged FilesClick this button to revert the files that have not been modified locally. Subversion
Perforce
/help/img/idea/2017.2/vcsToolbarGroupByDirIcon.png Group by Directory
Ctrl+P
Click this button to toggle between the flat view and the directory tree view. All VCSs
/help/img/idea/2017.2/expandAll.png
/help/img/idea/2017.2/collapseAll.png
Expand or collapse all nodes
Ctrl+NumPad Plus
Ctrl+NumPad Minus
Click these buttons to expand or collapse all nodes in the directory tree. These buttons are not available in flat view. All VCSs
Change list N/A From this drop-down list, select the changelist that contains the modified files to be checked in or included in the patch. The active changelist is selected by default. All VCSs
/help/img/idea/2017.2/icon_showDiff.png Show Differences
Ctrl+D Click this button to open the Differences dialog box that highlights the differences between your local working copy of the selected file and its repository version. All VCSs /help/img/idea/2017.2/refresh.png Refresh Changes
Ctrl+Alt+R Click this button to reload the Changed files tree view so it is up-to-date. All VCSs /help/img/idea/2017.2/rollback.png Revert Click this button to revert all changes made to the local working copy of the selected files. All VCSs /help/img/idea/2017.2/edit.png Jump to source
F4 Click this button to open the source code of the selected file in the editor. All VCSs /help/img/idea/2017.2/vcsToolbarGroupByDirIcon.png Group by Directory
Ctrl+P Click this button to toggle between the flat view and the directory tree view. All VCSs /help/img/idea/2017.2/moveToOtherChangelist.png Move to Another Changelist
Ctrl+R, O Click this button to add the selected file(s) to another changelist. The Move to Another Changelist dialog box opens where you can select an existing changelist or create a new one. All VCSs /help/img/idea/2017.2/expandAll.png
/help/img/idea/2017.2/collapseAll.png Expand or collapse all nodes
Ctrl+NumPad Plus
Ctrl+NumPad Minus Click these buttons to expand or collapse all nodes in the directory tree. These buttons are not available in flat view. All VCSs
Icon and TooltipShortcutDescription
/help/img/idea/2017.2/commit_message_history.png Commit Message HistoryCtrl+MClick this icon to invoke the Commit Message History dialog that contains a list of your twenty-five last commits and the corresponding commit messages.
ItemTooltip and ShortcutDescription
/help/img/idea/2017.2/arrowUp.png/help/img/idea/2017.2/arrowDown.pngPrevious Difference / Next Difference Shift+F7 F7
Use these buttons to jump to the next/previous difference.

When the last/first difference is hit, Rider suggests to click the arrow buttons F7/Shift+F7 once more and compare other files, depending on the Go to the next file after reaching last change option in the Differences Viewer settings.

This behavior is supported only when the Differences Viewer is invoked from the Version Control tool window.

/help/img/idea/2017.2/comparePreviousFile.png
/help/img/idea/2017.2/compareNextFile.png
Compare Previous/Next File
Alt+LeftAlt+Right
Click these buttons to compare the local copy of the previous/next file with its update from the server.
/help/img/idea/2017.2/edit.png Jump to Source
F4
Click this button to open the selected file in the active pane in the editor. The caret will be placed in the same position as in the Differences Viewer.
Viewer type
/help/img/idea/2017.2/diffViewer_type.png
Use this drop-down list to choose the desired viewer type. The side-by-side viewer has two panels; the unified viewer has one panel only.

Both types of viewers enable you to

  • Edit code. Note that one can change text only in the right-hand part of the default viewer, or, in case of the unified viewer, in the lower ("after") line, i.e. in your local version of the file.
  • Perform the Apply/Append/Revert actions.
Whitespace
/help/img/idea/2017.2/diffViewer_whitespaces.png
Use this drop-down list to define how the differences viewer should treat white spaces in the text.
  • Do not ignore: white spaces are important, and all differences are highlighted. This option is selected by default.
  • Trim whitespaces: ("\t", " "), if they appear in the end and in the beginning of a line.
    • If two lines differ in trailing whitespaces only, these lines are considered equal.
    • If two lines are different, such trailing whitespaces are not highlighted in the By word mode.
  • Ignore whitespaces: white spaces are not important, regardless of their location in the source code.
  • Ignore whitespaces and empty lines: the following entities are ignored:
    • all whitespaces (as in the 'Ignore whitespaces' option)
    • all added or removed lines consisting of whitespaces only
    • all changes consisting of splitting or joining lines without changes to non-whitespace parts.
      For example, changing a b c to a \n b c is not highlighted in this mode.
Highlighting mode
/help/img/idea/2017.2/diffViewer_highlight.png
Select the way differences granularity is highlighted.
The available options are:
  • Highlight words: the modified words are highlighted
  • Highlight lines: the modified lines are highlighted
  • Highlight split changes: if this option is selected, big changes are split into smaller 'atomic' changes.
    For example, A \n B vs. A X \n B X will be treated as two changes instead of one.
  • Do not highlight: if this option is selected, the differences are not highlighted at all. This option is intended for significantly modified files, where highlighting only introduces additional difficulties.
/help/img/idea/2017.2/collapseAll.png Collapse unchanged fragmentsClick this button to collapse all unchanged fragments in both files. The amount of non-collapsible unchanged lines is configurable in the Diff & Merge settings page.
/help/img/idea/2017.2/sync_scrolling.png Synchronize scrolling Click this button to scroll both differences panes simultaneously. If this button is released, each pane can be scrolled independently.
/help/img/idea/2017.2/disable_editing.png Disable editing Click this button to enable editing of the local copy of the selected file, which is disabled by default. When editing is enabled, you can make last-minute changes to the modified file before committing it.
/help/img/idea/2017.2/cogwheel_blue_with_arrow.png Editor settings Click this button to open a drop-down list of available options. Select or clear these options to show or hide line numbers, indentation guides, white spaces, and soft wraps.
/help/img/idea/2017.2/external_tool.pngShow diff in external toolClick this button to invoke an external differences viewer, specified in the External Diff Tools settings page.

This button only appears on the toolbar when the Use external diff tool option is enabled in the External Diff Tools settings page.

/help/img/rider/2017.1/icon_help.pngHelp
F1
Click this button to show the corresponding help page.
pull requestsSelect Other ForkForm OwnerShow DiffLogMerging, Deleting, and Comparing Branches Merge actions /help/img/idea/2017.2/leftDiff.png//help/img/idea/2017.2/rightDiff.png//help/img/idea/2017.2/branchDiff.png Compare Left and Middle/Middle and Right/Left and Right Contents Click these buttons to compare left/middle/right parts in a new window. /help/img/idea/2017.2/applyNotConflicts.png Apply All Non-Conflicting Changes Click this button to apply all non-conflicting changes. You can also make this behavior automatic, by selecting the check box Automatically apply non-conflicting changes in the Diff & Merge page of the Settings/Preferences dialog. /help/img/idea/2017.2/applyNotConflictsLeft.png//help/img/idea/2017.2/applyNotConflictsRight.png Apply Non-Conflicting Changes from the Left/Right Side Click these buttons to merge non-conflicting changes from the left/right parts of the dialog. activeChangelistShelfShelf
  • working copy: select this option to get files/directories from the repository subtrees that have not been checked out yet.
  • empty: select this option to involve only the current file.
  • files: select this option to involve files from the current folder.
  • immediates: select this option to involve direct children of the current file.
  • infinity: select this option to enable full recursion.

Do the following:

  1. From the main menu, choose VCS | Mercurial | Push VCS | Git | Push. The Push Commits dialog opens showing all Mercurial Git repositories (for multi-repository projects) and listing all commits made in the current branch in each repository since the last push.

    If you have a project that uses multiple repositories that are not controlled synchronously, only the current repository is selected by default. For details on how to enable synchronous repositories control refer to Version Control Settings: Mercurial Version Control Settings: Git.

  2. If necessary, you can modify the path to the remote repository by clicking it. The label turns into a text field where you can type the new path or invoke completion by pressing Ctrl+Space. If you add a new remote, it will be saved and you can edit it later via VCS | Git | Remotes (for details, see Managing Remotes).

    If there are no remotes in the repository, the Define remote link appears. Click this link and specify the remote name and URL in the dialog that opens.

  3. If you want to modify the target branch where you want to push, you can do this in the same way as for the remote repository. You can also click the Edit all targets link in the bottom right corner to edit all branch names simultaneously.

    Note that you cannot change the local branch: the current branch for each selected repository will be pushed.

  4. If you want to preview changes before pushing them, select the required commit. The right-hand pane shows the changes included in the selected commit. You can use the toolbar buttons to examine the commit details.
  5. If you want to push active bookmarks with your commits (they are not sent to the remote repositories by default), select the Export Active Bookmarks option.
  6. Click the Push button when ready and select which operation you want to perform from the drop-down menu: push or push --force.

These choice options are only available if the Allow force push option is enabled (see Version Control Settings: Git), otherwise, you can only perform the push operation.

When you run push, Git Mercurial will refuse to complete the operation if the remote repository has changes that you are missing and that you are going to overwrite with your local copy of the repository. Normally, you need to perform pull to synchronize with the remote before you update it with your changes.

The --force push command disables this check and lets you overwrite the remote repository, thus erasing its history and causing data loss.

A possible situation when you may still need to perform --force push is when you rebase a pushed branch and then want to push it to the remote server. In this case, when you try to push, Git Mercurial will reject your changes because the remote ref is not an ancestor of the local ref. If you perform pull in this situation, you will end up with two copies of the branch which you then need to merge.

If you decide to force push the rebased branch and you are working in a team, make sure that:

  • Nobody has pulled your branch and done some local changes to it
  • All pending changes have been committed and pushed
  • You have the latest changes for that branch

By default, Rider always "remembers" the last commit hash. However, this information is not sufficient if the history has been changed since the last commit as a result of running the rebase operation. In this case, having a copy of the base revision may help.

ItemDescription
Reformat code Select this check box to perform code formatting according to the Project Code Style settings.
Rearrange code Select this check box to rearrange your code according to the.
Optimize imports Select this check box to remove redundant import statements.
Perform code analysis Select this check box to run code inspection on the files you are about to commit.
Check TODO (<filter name>) Select this check box to review the TODO items matching the specified filter. Click the Configure link to choose an existing TODO filter, or open the TODO settings page and define a new filter to be applied.
Cleanup Select this check box if you want to automatically apply the current inspection profile to the files you are going to commit.
Revert unchanged files Select this check box to revert the files that have not been modified.

This option is only available for Perforce.

Use this dialog to configure a list of files and directories that you do not want to put under version control. These can be file names associated with VCS administration, backup files, and any other artifacts that you want to remain unversioned. You can also specify patterns of files you want to ignore.

ItemKeyboard shortcutDescription
/help/img/idea/2017.2/new.pngCtrl+NUse this icon or shortcut to add an item to the list. The Ignore Unversioned Files dialog box opens where you can type an exact path to a file or directory to be ignored or specify a pattern that defines the names of files and directories to be ignored.
/help/img/idea/2017.2/edit1.pngEnterUse this icon or shortcut to edit the selected path or pattern in the Ignore Unversioned Files dialog box.
/help/img/idea/2017.2/delete.pngCtrl+R, DUse this icon or shortcut to remove the selected path or pattern from the list.

Two characters can be used as wildcards:

  • *: to replace any string.
  • ?: to replace a single character.

For example, *.iml will ignore all files with the iml extension; *.?ml will ignore all files whose extension ends with ml.

The rule is applied recursively to all subdirectories of the specified directory. If a directory has several subdirectories and you want only one of them ignored, specify the required directory explicitly, for example, my_folder/my_subfolder1/my_subfolder2/.

The changes you introduce to the text are color-coded:

  • /help/img/idea/2017.2/lineAddedMarker.png line added.
  • /help/img/idea/2017.2/lineChangededMarker.png line changed.

The pane consists of two areas:

  • The affected code as it was in the base revision.
  • The affected code as it is after a change has been made.

When this option is enabled, the following line is automatically added at the end of the commit message: Signed off by: <username>

  • Commit and Push: select this option to push the changes to the remote repository immediately after the commit. This option is available if you are using Git or Mercurial as a version control system.
  • Create MQ Patch: select this option to create an MQ patch based on your changes. This option is only available if you are using Mercurial as a version control system.
  • Create Patch: select this option if you want Rider to generate a patch based on the changes you are about to commit. In the Create Patch dialog that opens, type the name of the patch file and specify whether you need a reverse patch.
  • Remote Run: select this option to run your personal build. This option is only available when you are logged in to TeamCity. Refer to TeamCity plugin documentation for details.
ColorFile StatusDescription
BlackUp to dateFile is unchanged.
/help/img/idea/2017.2/highlightBlackTxt.GIF
Gray DeletedFile is scheduled for deletion from the repository.
/help/img/idea/2017.2/highlightGrey.gif
Blue ModifiedFile has changed since the last synchronization.
/help/img/idea/2017.2/highlightBlueTxt.GIF
Green AddedFile is scheduled for addition to the repository.
/help/img/idea/2017.2/highlightGreenTxt.GIF
Violet MergedFile is merged by your VCS as a result of an update.
/help/img/idea/2017.2/highlightVioletTxt.GIF
Brown UnversionedFile exists locally, but is not in the repository, and is not scheduled for adding.
/help/img/idea/2017.2/highlightBrown.gif
Olive IgnoredFile will be ignored in any VCS operation.
/help/img/idea/2017.2/highlightOlive.gif
Light brown HijackedFile is modified without checkout. This status is valid for the files under Perforce, ClearCase and VSS.
hijacked
Red Merged with conflictsDuring the last update, file was merged with conflicts.
/help/img/idea/2017.2/highlightRedTxt.GIF
Lilac Externally deletedFile is deleted locally, but was not scheduled for deletion, and still exists in the CVS repository.
/help/img/idea/2017.2/highlightLilac.gif
Dark cyan SwitchedThe file is taken from a different branch than the whole project. This status is valid for CVS and SVN.
/help/img/idea/2017.2/highlightCyanTxt.GIF
ItemTooltip and ShortcutDescription
/help/img/idea/2017.2/icon_showDiff.png Compare
Ctrl+D
Click this button to compare the selected revision of a file with its previous revision in the Differences viewer for files.
/help/img/idea/2017.2/icon_showDiffLocal.pngShow Diff with LocalClick this button to compare the selected revision of a file with its local copy in the Differences viewer for files.
/help/img/idea/2017.2/iconCreatePatch.pngCreate PatchClick this button to create a patch from the selected revision.
/help/img/idea/2017.2/historyViewGetIcon.pngGetClick this button to retrieve the selected revision. If the local copy has already been modified, Rider prompts to overwrite the local version, or cancel the operation.
/help/img/idea/2017.2/annotate-details.pngAnnotateClick this button to open the selected revision of a file in the editor with annotations.
/help/img/idea/2017.2/showAffectedFiles.pngShow All Affected Files
Shift+Alt+A
Click this button to open the Paths Affected in Revision dialog where you can view all files that were modified in the selected revision.
/help/img/idea/2017.2/copy.gifCopy Revision NumberClick this button to copy the revision number of the commit that the selected file belongs to to the clipboard.
/help/img/idea/2017.2/openGitHub.pngOpen in GitHubClick this button to open the page that corresponds to the selected commit on GitHub.
/help/img/idea/2017.2/showAllBranchesIcon.png Show All Branches Click this button to display changes from branches other than the current one.
/help/img/idea/2017.2/hierarchyClassButton.pngShow Branches

Click this button to show branches.

/help/img/idea/2017.2/icon_ChangeListShowAll.pngShow All Revisions Submitted In Selected Changelist

Click this button to display the list of all revisions committed in the same changelist as the selected revision of a file.

/help/img/idea/2017.2/refresh.pngRefreshClick this button to refresh the current information.
/help/img/idea/2017.2/showDetails.pngShow DetailsClick this button to show the commit message for the selected revision.
/help/img/idea/2017.2/close.pngClose
Ctrl+Shift+F4
Click this button to close the current history tab.
Open the Version Control tool window (Alt+9) and switch to the Local Changes tab. Open the Version Control tool window (Alt+9) and switch to the Log tab.
/help/img/idea/2017.2/iconCreatePatch.png
Create Patch Choose this option to create a patch file based on shelved changes. In the Create Patch dialog box that opens, specify the file to save the patch in, and the changes to create a patch from. By default, all changes from the shelf are selected. To view which changes are included, click the Selected link.

For details, see Creating Patches.

/help/img/idea/2017.2/clean_unshelved_changes.png Clean Already Unshelved Click this icon to explicitly remove all unshelved changes if you are not going to reuse them.

Shelving is temporarily storing pending changes you have not committed yet. This is useful, for example, if you need to switch to another high priority task and you want to set your changes aside to work on them later.

With Rider, you can shelve both separate files and entire changelists.

Once shelved, a change can be applied as many times as you need by unshelving and subsequently restoring it on the shelf.

Shelve changes

  1. Open the Version Control tool window (Alt+9) and switch to the Local Changes tab.
  2. Select the files or a changelist you want to put to a shelf. On the main Version Control menu or on the context menu of the selection, choose Shelve changes.
  3. In the Shelve Changes dialog, review the list of modified files.
  4. In the Commit Message field, enter the name of the shelf to be created and click the Shelve Changes button.

You can also shelve changes silently, without displaying the Shelve Changes dialog. To do this, select a file or a changelist you want to shelve, and click the Shelve Silently icon /help/img/idea/2017.2/shelve_silently_icon.png on the toolbar, or press Ctrl+Alt+H. The name of the changelist containing the changes you want to shelve will be used as the shelf name.

Unshelve changes

Unshelving is moving postponed changes from a shelf to a pending changelist. Unshelved changes can be filtered out from view or removed from the shelf.

  1. In the Shelf tab of the Version Control tool window, select a changelist or files you want to unshelve.
  2. Press Ctrl+Shift+U or choose Unshelve from the context menu of the selection.
  3. In the Unshelve Changes dialog that opens, specify the changelist you want to restore the unshelved changes to in the Name field. You can select an existing changelist from the drop-down list or type a name for a new changelist to be created containing the unshelved changes. You can enter the description of the new changelist in the Comment field (optional).

    If you want to make the new changelist active, select the Set active option. Otherwise, the current active changelist remains active.

  4. If you want Rider to preserve the context of a task associated with the new changelist on its deactivation and restore the context then the changelist becomes active, select the Track context option (see Managing tasks and contexts for details).
  5. If you want to remove the changes you are about to unshelve, select the Remove successfully applied files from the shelf option. The unshelved files will be removed from this shelf and added to another changelist and marked as applied. They will not be removed completely until deleted explicitly by clicking the /help/img/idea/2017.2/clean_unshelved_changes.png icon on the toolbar, or selecting Clean Already Unshelved from the context menu.
  6. Click OK. If conflicts occur between the patched version and the current version, resolve them as described in Resolving Conflicts.

You can also unshelve changes silently, without displaying the Unshelve Changes dialog. To do this, select a file or a changelist you want to unshelve, and click the Unshelve Silently icon /help/img/idea/2017.2/unshelve_silently_icon.png on the toolbar, or press Ctrl+Alt+U. The unshelved files will be moved to the active pending changelist.

Restore unshelved changes

Rider lets you reapply unshelved changes if necessary. All unshelved changes can be reused until they are removed explicitly by clicking the /help/img/idea/2017.2/clean_unshelved_changes.png icon on the toolbar, or selecting Clean Already Unshelved from the context menu.

To restore applied changes on the shelf do the following:

  1. Make sure that the Show Already Unshelved /help/img/idea/2017.2/show_already_unshelved.png toolbar option is enabled.
  2. Select the files or the shelf you want to restore.
  3. On the context menu of the selection, choose Restore.

Apply external patches

You can import patches created inside or outside Rider and apply them as shelved changes.

  1. In the Shelf tab of the Version Control tool window, choose Import Patches from the context menu.
  2. In the dialog that opens, select the patch file to apply. The selected patch appears in the Shelf tab as a shelf.
  3. Select the newly added shelf with the patch and choose Unshelve Changes from the context menu of the selection.

Automatically shelve base revision

It may be useful to configure Rider to always shelve base revisions of files that are under Git version control. To do this, open the Settings dialog (Ctrl+Alt+S), select the Version Control | Shelf node on the left and select the Shelve base revisions of files under distributed version control systems option.

If this option is enabled, the base revision of files will be saved to a shelf that will be used during a 3-way merge if applying a shelf leads to conflicts. If it is disabled, Rider will look for the base revision in the project history, which may take a while; moreover, the revision that the conflicting shelf was based on may be missing (for example, if the history was changed as a result of the rebase operation).

Change the default shelf location

By default, the shelf directory is located under your project directory. However, you may want to change the default shelf location. This can be useful, for example, if you want to avoid deleting shelves accidentally when cleaning up your working copy, or if you want to store them in a separate repository allowing shelves to be shared among your team members.

  1. Open the Settings dialog (Ctrl+Alt+S) and select the Version Control | Shelf node on the left.
  2. Click the Change Shelves Location button and specify the new location in the dialog that opens.
  3. If necessary, select the Move shelves to the new location option to move existing shelves to the new directory.

Watch this video tutorial on how to benefit from shelves to be able to switch to a different task without losing unfinished work:

To resolve conflicts, do the following:

  1. Click Merge in the Files Merged with Conflicts dialog, or select the conflicting file in the editor and choose VCS | <your_VCS> | Resolve Conflicts from the main menu.
  2. To automatically merge all non-conflicting changes, click /help/img/idea/2017.2/applyNotConflicts.png (Apply All Non-Conflicting Changes) on the toolbar. You can also use the /help/img/idea/2017.2/applyNotConflictsLeft.png (Apply Non-Conflicting Changes from the Left Side) and /help/img/idea/2017.2/applyNotConflictsRight.png (Apply Non-Conflicting Changes from the Right Side) to merge non-conflicting changes from the left/right parts of the dialog respectively.
  3. To resolve a conflict, you need to select which action to apply (accept /help/img/idea/2017.2/chevron_button.png or ignore /help/img/idea/2017.2/ignore_button.png) to the left (local) and the right (repository) version, and check the resulting code in the central pane:
    /help/img/idea/2017.2/resolveConflict.png

    For simple conflicts (for example, if the beginning and the end of the same line have been modified in different file revisions), the Resolve option is available that allows merging the changes in one click:

    Such conflicts are not resolved with the Apply All Non-Conflicting Changes action since you must make sure that they are resolved properly.

    /help/img/idea/2017.2/simple_conflict_resolve.png
  4. It may also be useful to compare different versions to resolve a conflict. Use the /help/img/idea/2017.2/conflicts_compare_options.png toolbar button to invoke the list of options. Note that Base refers to the file version that the local and the repository versions originated from (initially displayed in the middle pane), while Middle refers to the resulting version.
  5. Review merge results in the central pane and click Apply.
Last modified: 11 October 2017