# Git

###

## Git 원리

### 3 way merge

* base 브랜치에서 A와 B 브랜치가 분기된 상황일 때, A와 B를 병합하며 충돌이 난 경우, 아래 과정을 통해 병합한다.

  1\) base 브랜치와 비교하여 '수정되지 않은 버전'과 '수정된 버전'의 코드를 구분한다.

  2\) '수정된 버전'의 코드를 채택하여 자동 병합한다.\
  3\) 만약 '수정되지 않은 버전'의 코드를 확인할 수 없을 경우엔 수동으로 병합한다.

  * [참고](https://www.youtube.com/watch?v=43VjIv9LE2s\&t=2s)


---

# Agent Instructions: 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:

```
GET https://injun-woo30000.gitbook.io/growth-log/i-learned/collaboration/git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
