> For the complete documentation index, see [llms.txt](https://help.goorm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.goorm.io/ko/goormide/workspace/features/merge-code.md).

# 코드 병합

두 소스 코드를 하나의 코드로 병합합니다. \
버전 관리 시 충돌이 일어났을 때, 직접 충돌을 해결하기 위해 이용할 수 있습니다. \
병합을 하지 않아도 두 소스 코드의 다른 점을 쉽게 파악할 수 있습니다.\
\
\&#xNAN;**\[편집]** → **\[코드 병합]**&#xC758; 하위 메뉴를 통해 사용하세요. 단축키를 이용하면 편리하게 기능을 이용할 수 있습니다.

* **코드 병합 창 보기(`Alt + Shift + M (Mac: ⌥⇧M)`)**: \
  먼저 병합하고자 하는 두 파일을 선택합니다. \
  \&#xNAN;**`확인`** 버튼을 누르면 두 소스 코드간의 차이점이 에디터에 표시됩니다.<br>
* **다음 차이점(`Alt + Shift + = (Mac: ⌥⇧=)`)**: \
  현재 커서로부터 가장 가까운 다음 차이점으로 이동합니다. \
  차이점이 선택되면 배경색이 바뀝니다.<br>
* **이전 차이점(`Alt + Shift + - (Mac: ⌥⇧-)`)**: \
  현재 커서로부터 가장 가까운 이전 차이점으로 이동합니다. \
  차이점이 선택되면 배경색이 바뀝니다.<br>
* **차이점 병합(`Alt + Shift + / (Mac: ⌥⇧/)`)**: \
  현재 선택된 차이점을 오른쪽 에디터에서 왼쪽 에디터로 덮어씌웁니다. \
  병합 에디터 중앙의 화살표 아이콘(**`<~`**)을 눌러 병합할 수도 있습니다. \
  차이점이 선택되지 않았다면 제일 첫 번째 차이점을 병합합니다.

![](/files/-LvyYsEkuzJa-GlciXC9)

병합 에디터 하단 중앙의 **`=><=`** 아이콘을 누르면 양쪽 에디터의 스크롤을 묶거나 풀 수 있습니다. \
기본 상태는 양쪽 에디터의 스크롤이 같이 움직이는 상태입니다. \
스크롤을 풀면, 양쪽 에디터의 스크롤이 각자 움직입니다.\
\
병합 후, 저장하면 왼쪽 에디터 원본에 병합된 내용이 저장됩니다. 오른쪽 에디터는 수정이 불가 합니다. \
코드 병합 창은 새로고침하면 유지되지 않습니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.goorm.io/ko/goormide/workspace/features/merge-code.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
