# Diff Viewer for folders

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

> **TL;DR**
> `Project     tool window | context menu of a folder | Compare With…`
>
>
>
> `Project     tool window | context menu of two selected folders | Compare Directories`
>
>
>
> `Project tool window | context menu of a folder | Sync with Deployed to`
>
>
>
> `Remote Host tool window | context menu of a folder | Sync with local`

This window is displayed when you explore the differences between:

* [Two local directories](comparing-files-and-folders.html)

By using this dialog, you can explore differences and synchronize files between different folders.

> **Tip:**
> You can also open the Diff Viewer without running GoLand. Run the following command: `<path to GoLand executable file> diff <path_1> <path_2>` where `path_1` and `path_2` are paths to the folders you want to compare.

## Toolbar

| Icon | Tooltip and shortcut | Description | Available for |
| --- | --- | --- | --- |
| ![the Previous Difference button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.up.svg)/ ![the Next Difference button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.down.svg)  |  `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ]` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F7` (VSCode), `F7` (VSCode (macOS)) `Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ [` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (VSCode), `⇧ F7` (VSCode (macOS))  |    Navigate between next and previous differences.      When the last or first difference is hit, GoLand suggests to press `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ]` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F7` (VSCode), `F7` (VSCode (macOS))/`Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ [` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (VSCode), `⇧ F7` (VSCode (macOS)) once more and compare other files.     > **Tip:** > This feature becomes available only when the Diff Viewer is invoked from the   Version Control tool window  `Alt+9` (Windows), `⌘ 9` (macOS), `⌘ 9` (IntelliJ IDEA Classic (macOS)), `⌘ 9` (macOS System Shortcuts), `Alt+9` (XWin), `Alt+9` (GNOME), `Alt+9` (KDE), `Alt+9` (Emacs), `Alt+9` (Sublime Text), `⌘ 9` (Sublime Text (macOS)), `Ctrl+Shift+G` (VSCode), `⌃ ⇧ G` (VSCode (macOS)) .    | Version control |
| ![the Jump to Source button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.edit.svg) |    Jump to Source   `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (VSCode), `F4` (VSCode (macOS))  | Open a file in the active tab of the editor. The caret is placed in the same position as in the Diff Viewer.  | All |
| ![Refresh](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.refresh.svg) |  Refresh  | Refresh the contents of the Diff Viewer. | All |
|  ![Show new files on left side](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.arrow_right.svg)  |  Show New Files on Left Side | Display items that are present in the first of the compared directories or database objects and are missing in the second one in the left pane.  | All |
| ![Show diff in external tool](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.externalTools.svg) | Show diff in external tool |    Invoke an external diff viewer. For more information about the external differences viewer, refer to the [External Diff Tools](settings-tools-external-diff-tools.html) page.      This button is only available if the Use external diff tool option is selected in the [External Diff Tools](settings-tools-external-diff-tools.html) settings page.    | All |
| ![Show difference](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.not_equal.svg) |  Show Difference | Display items that are present in both folders or database objects but have different contents, timestamp, or size. | All |
| ![Show equal files](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.equal.svg) |  Show Equal Files |  Display items that are present in both directories or objects and have the same contents, timestamp, and size, depending on the parameter set in Compare by list.  | All |
| ![Show new files on right sid](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.arrow_left.svg) |  Show New Files on Right Side | Show the items that are present in the second of the compared directories and are missing in the first one. The same rule applies to database objects. | All |
|                        |  Compare by |    Applies the selected parameter for comparison. You can select between the following parameters:        * Binary Content    * Text (charset and line separators are ignored)    * Size    * Size and Timestamp    |    Local folders     Local-remote folders    |
|  ![Synchronize Selected](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.resume.svg)  |  Synchronize Selected `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (VSCode), `⏎` (VSCode (macOS))  |    Apply the [specified action](#suggested_action) to the selected pair of items.     In the * column of the table, you can see actions that are going to be performed.    |  All  |
|  ![Synchronize All](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.run.rerun.svg)  |  Synchronize All `Ctrl+Enter` (Windows), `⌘ ⏎` (macOS), `⌘ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ ⏎` (macOS System Shortcuts), `Ctrl+Enter` (XWin), `Ctrl+Enter` (GNOME), `Ctrl+Enter` (KDE), `Ctrl+Enter` (Emacs), `Ctrl+Enter` (Sublime Text), `⌘ ⏎` (Sublime Text (macOS)), `Ctrl+Enter` (VSCode), `Ctrl+Enter` (VSCode (macOS))  | Apply the [specified action](#suggested_action) to all the pairs of items in the list.     In the * column of the table, you can see actions that are going to be performed.    |  All  |
|  ![the Swap Sides button](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.swapPanels.svg)  |  Swap Sides  |  Click this button to swap the sides in the Diff Viewer.  | All |
|  ![Hide excluded files](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.filter.svg)  |  Hide excluded files  | Hide files that are [excluded from synchronization](excluding-files-and-folders-from-deployment.html).  |  Local-remote folders  |
|  | Filter |    Filter objects in comparing folders.     You can type a file or table name and filter all the objects according to this name. Use the asterisk wildcard (*) to replace any number of arbitrary characters.      Note that filter applies when you press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (VSCode), `⏎` (VSCode (macOS)).     |  All  |
|  | Path |  These fields show the paths to the folders that are compared. To change a directory, click the Browse button (![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg)) and specify another directory.  |    Local folders  Local-remote folders    |
|  ![the Help icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.help.svg)  |    Help   `F1` (Windows), `⌘ ⇧ F1` (macOS), `F1` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F1` (macOS System Shortcuts), `F1` (XWin), `F1` (GNOME), `F1` (KDE), `F1` (Emacs), `F1` (Sublime Text), `⌘ ⇧ F1` (Sublime Text (macOS)), `F1` (VSCode), `⌘ ⇧ F1` (VSCode (macOS))  | Open a browser and show the corresponding help page. | All |

## Comparison table

The table lists the items that meet the comparison criterion specified in the [Compare by](#comparison_parameter) list and the filtering criteria specified through the [toolbar buttons](#filtering_toggle_buttons).

|  Item  | Description |  Available for  |
| --- | --- | --- |
|  Name  |  The column lists names of files or data source objects that belong to the object specified in the path field.  |  All  |
|  Size  |  The column lists file sizes.  |    Local folders     Local-remote folders    |
|  Date  |  The column lists file timestamps.  |    Local folders     Local-remote folders    |
| * |     The column lists actions that will be applied to the pair of items in one row.                                * ![Copy the item on the left side to the right side](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.arrow_right.svg): copy the item on the left side to the right side. This action might overwrite the contents of the corresponding target item if the target item already exists.    * ![Copy the item on the right side to the left side](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.arrow_left.svg): copy the item on the right side to the left side. This action might overwrite the contents of the corresponding target item if the target item already exists.    * ![The items are treated identical with regard to the selected criterion of comparison](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.equal.svg): items in both objects are treated identical with regard to the selected comparison options. No action is performed.    * ![The items differ with regard to the selected criterion of comparison](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.not_equal.svg): the items differ according to the selected comparison options. No action is performed. You can explore the differences between objects in the [Differences Pane](#differences_pane) and change the intended action by clicking its icon.    * ![The item is present only in one of the folders and will be remove](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.remove.svg): the item exists only in one of the folders and will be removed.      Also, you can apply the action by clicking Synchronize Selected ![Synchronize Selected](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.resume.svg) or Synchronize All ![Synchronize All](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.rerun.svg) toolbar buttons. The Synchronize Selected button applies operations only to the selected files. The Synchronize All button applies operations to all the files       To change the selected action, click the action icon in the * column.     |  All  |

## Differences pane

The differences pane is displayed only for files and data source objects  that have the same names and exist in both folders. If a file or a database object exists only in one folder, the pane displays the contents of the selected file.

To switch between the panes of the Diff Viewer, press `Ctrl+Tab` (Windows), `⌃ ⇥` (macOS), `⌃ ⇥` (IntelliJ IDEA Classic (macOS)), `⌃ ⇥` (macOS System Shortcuts), `Ctrl+Tab` (XWin), `Ctrl+Tab` (GNOME), `Ctrl+Tab` (KDE), `Ctrl+X, B` (Emacs), `Ctrl+Tab` (Sublime Text), `⌃ ⇥` (Sublime Text (macOS)), `Ctrl+Tab` (VSCode), `⌃ ⇥` (VSCode (macOS)). The active pane has the caret.

### Diff viewer

| Item | Tooltip and Shortcut | Description |
| --- | --- | --- |
| ![the Previous Difference button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.up.svg)/![the Next Difference button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.down.svg) | Previous Difference / Next Difference `Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ [` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (VSCode), `⇧ F7` (VSCode (macOS)) `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ]` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F7` (VSCode), `F7` (VSCode (macOS)) |    Jump to the next or previous difference.       When the last or the first difference is reached, GoLand suggests clicking the arrow buttons or pressing `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ]` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F7` (VSCode), `F7` (VSCode (macOS))/`Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ [` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (VSCode), `⇧ F7` (VSCode (macOS)) once more and comparing other files modified locally. This behavior depends on the [Go to the next file after reaching last change](settings-tools-diff-and-merge.html#last_diff) option in the [Diff Viewer settings](settings-tools-diff-and-merge.html).     |
|     ![the Compare Previous File icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.left.svg)       ![the Compare Next File icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.right.svg)     |    Compare Previous/Next File   `Alt+Left` (Windows), `⌘ ⇧ [` (macOS), `⌃ ←` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ←` (macOS System Shortcuts), `Alt+Left` (XWin), `Alt+Left` (GNOME), `Alt+Left` (KDE), `Alt+Left` (Emacs), `Ctrl+Page Up` (Sublime Text), `⌘ ⇧ [` (Sublime Text (macOS)), `Ctrl+Page Up` (VSCode), `⌘ ⇧ [` (VSCode (macOS))`Alt+Right` (Windows), `⌘ ⇧ ]` (macOS), `⌃ →` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ →` (macOS System Shortcuts), `Alt+Right` (XWin), `Alt+Right` (GNOME), `Alt+Right` (KDE), `Alt+Right` (Emacs), `Ctrl+Page Down` (Sublime Text), `⌘ ⇧ ]` (Sublime Text (macOS)), `Ctrl+Page Down` (VSCode), `⌘ ⇧ ]` (VSCode (macOS)) |    Compare the local copy of the previous or next file with its update from the server.      > **Note:** > These controls are only available if more than one file has been modified locally.     |
|  ![the Jump to Source button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.edit.svg)  |    Jump to Source   `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (VSCode), `F4` (VSCode (macOS))  |  Open the selected file in the editor. The caret is placed in the same position as in the Diff Viewer.  |
|     Side-by-side viewer  / Unified viewer      |     Select a viewer mode: side-by-side or unified. The side-by-side mode has two panels, and the unified mode has one panel.       You can edit code and perform the Accept, Append, Revert actions in both viewers.     You can change text only in the right part of the side-by-side viewer or in the lower line in the unified viewer.     You can edit only local versions of your files. You cannot edit files that have read-only status.    |
|  ![the Collapse Unchanged Fragments icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.collapseAll.svg)  | Collapse Unchanged Fragments | Collapse all the unchanged fragments in both files. The number of non-collapsible unchanged lines is configurable on the Diff & Merge settings page. To open the Diff & Merge page, open settings by pressing `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) and navigate to `Tools \| Diff & Merge`. .  |
|  ![the Settings button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.settings.svg) | Settings |    Some of these commands are also available from the context menu of the Diff Viewer gutter.       Align Changes in Side-by-Side Diff: vertically aligns the corresponding lines by padding differences with empty space.       Synchronize Scrolling: scroll both diff panes simultaneously.       Show Diff in Editor Tab: displays the Diff viewer as an editor tab instead of a separate window.       Show Diff in Separate Window: displays the Diff viewer as a separate window instead of an editor tab.       Ignore Differences: define how the Diff Viewer should treat whitespaces.        * None: white spaces are important, and all the differences are highlighted. This option is selected by default.    * Trim whitespaces: trim whitespaces if they appear in the end and at the beginning of a line (`("\t", " ")`). * If two lines differ in trailing whitespaces only, these lines are considered equal. * If two lines are different, trailing whitespaces are not highlighted in the [By word](#highlight) mode.    * Ignore whitespaces: white spaces are not important, regardless of their location in the source code.    * Ignore whitespaces and empty lines: ignores 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 that consist of splitting or joining lines without changes to non-whitespace parts. For example, differences between `a b c` and `a \n b c` are not highlighted in this mode.      Highlighting Differences: select the way differences granularity is highlighted.        * Words: modified words are highlighted    * Lines: modified lines are highlighted    * Split changes: if this option is selected, big changes are split into smaller changes. For example, `A \n B` and `A X \n B X` are treated as two changes instead of one.    * Characters: modified symbols are highlighted    * None: if this option is selected, the differences are not highlighted at all. Use the None option when you work with the files that were significantly modified. In such cases, highlighting might introduce additional difficulties during a review.    |
|  ![the External Tools icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.externalTools.svg)  | Show diff in external tool |    Invoke an external diff viewer specified on the [External Diff Tools](settings-tools-external-diff-tools.html) settings page.      This button is available only on the toolbar when the Use external diff tool option is enabled on the [External Diff Tools](settings-tools-external-diff-tools.html) settings page.   |
|  ![the Help icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.help.svg)  |    Help   `F1` (Windows), `⌘ ⇧ F1` (macOS), `F1` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ F1` (macOS System Shortcuts), `F1` (XWin), `F1` (GNOME), `F1` (KDE), `F1` (Emacs), `F1` (Sublime Text), `⌘ ⇧ F1` (Sublime Text (macOS)), `F1` (VSCode), `⌘ ⇧ F1` (VSCode (macOS))  | Open a browser and show the corresponding help page. |
|  ![apply left](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrowRight%4014x14.svg) ![apply right](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrow%4014x14.svg)  | Accept |    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 ![apply left](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrowRight%4014x14.svg) and ![apply right](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrow%4014x14.svg) to apply changes. This behavior is the default one.    * Press `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (VSCode), `Ctrl` (VSCode (macOS)) to change ![apply left](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrowRight%4014x14.svg) or ![apply right](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrow%4014x14.svg) to ![chevron button bottom right](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrowRightDown%4014x14.svg) or ![chevron button bottom left](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.diff.arrowLeftDown%4014x14.svg) and append changes.    |

## Context menu

The context menu appears when you right-click an entry in the list of items. The commands in this menu define which action must be taken for the selected entry when you click [Synchronize Selected](#synchronize-selected) or [Synchronize All](#synchronize-all). The selected action appears in the * column.

| Command | Icon | Description |
| --- | --- | --- |
| Set Copy to Right/Left | ![Set Copy to Right](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.arrow_right.svg)![Set Copy to Left](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.arrow_left.svg) | Copy a file missing in one of the directories. |
| Set Delete |  ![Set Delete](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.closeSmall.svg) | Delete a file. |
| Set Do Nothing |  | Remove an action icon. |
|  Set Mirror to Right  |  ![Set Mirror to Right](https://resources.jetbrains.com/help/img/idea/2026.3/app.diff.applyNotConflictsLeft.svg)  |  Mirror the contents of the left folder in the right folder when you click Synchronize All.  |
|  Set Mirror to Left  |  ![Set Mirror to Left](https://resources.jetbrains.com/help/img/idea/2026.3/app.diff.applyNotConflictsRight.svg)  |  Mirror the contents of the right folder in the left folder when you click Synchronize All.  |
| Set Default |  | Set the default action for the entry. |
| Warn When Delete |  | Display a warning before deleting a file that is located only in one of the two directories during their merge. |

