# Merge Code

Merges two source codes into one code.&#x20;

This can be used in version control to resolve conflicts directly when they arise. Even without merging, you can easily see the differences between the two source codes.

Use it via the **\[Edit] > \[Merge]** submenu. Shortcuts are available to make the feature more convenient.

* **Merge View (`Alt + Shift + M (Mac: ⌥⇧M)`):** \
  When launched, first select the two files you want to merge. \
  Pressing the **`OK`** button will open an editor showing the differences between the two source codes.\

* **Next Diff (`Alt + Shift + = (Mac: ⌥⇧=)`):** \
  Moves to the next difference closest to the current cursor. \
  The background colour changes when the difference is selected.\

* **Previous Diff (`Alt + Shift + - (Mac: ⌥⇧-)`):** \
  Moves to the previous difference closest to the current cursor. \
  The background colour changes when the difference is selected.\

* **Merge Diff (`Alt + Shift + / (Mac: ⌥⇧/)`):** \
  Overwrites the currently selected differences from the right editor into the left editor. \
  You can also merge by pressing the arrow icon (**`<~`**) in the centre of the merge editor. \
  If no differences are selected, the first difference is merged.

![](https://2181851870-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lq-Q9LciN1X9EABxGkt%2F-LvySq9HN831gjmHVAfe%2F-LvyYsEkuzJa-GlciXC9%2Fimage.png?alt=media\&token=0fc2ffab-c69d-4cd1-b20d-f31297a58f0f)

Press the **`=><=`** icon at the bottom centre of the merge editor to untie or untie the scrolls of both editors. T\
he default state is that the scrolls in both editors move together. \
If you untie the scrolls, the scrolls in both editors will move independently.

After merging, saving will save the merged content in the original left editor. \
The right editor is unmodifiable. \
The code merge window is not persisted across refreshes.
