> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab 동기화

> GitLab 계정을 연결하고, 프로젝트를 가져오거나 내보내고, 변경 사항을 양방향으로 동기화하고, 연결을 해제합니다.

프로젝트를 GitLab 저장소에 연결하세요. 변경 사항은 양방향으로 이동하며, **Sync**를 클릭할 때만 이동합니다. 자동으로 동기화되는 것은 없습니다.

> [!NOTE]
>
> 먼저 관리자가 [GitLab 동기화](https://ayakaleaf-pro.mintlify.site/ko/on-premises/configuration/overleaf-toolkit/integrations/gitlab-synchronisation.md)를 켜야 합니다.

## GitLab 계정 연결하기

이 작업은 한 번만 합니다.

**1. 계정 설정 열기**

**Account**를 클릭한 다음 **Account settings**를 클릭합니다. **Project synchronisation** 아래에서 **GitLab**을 찾아 **Link**를 클릭합니다.

![Link 버튼이 있는 계정 설정의 GitLab 섹션](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-link.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=cd34b300ea3566a7083df441f465a163)

계정 설정의 GitLab

**2. GitLab에서 승인**

GitLab이 열립니다. 요청을 받으면 로그인한 다음 애플리케이션을 승인합니다.

**3. 연결 확인**

계정 설정으로 돌아옵니다. GitLab 계정이 연결되었다는 녹색 메시지가 표시되고, 이제 버튼에 **Unlink**가 표시됩니다.

![Unlink 버튼이 있는 계정 설정의 GitLab 섹션](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-linked.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=f187b1d6ba770789495f03ecac75c7f7)

GitLab 계정이 연결됨

계정이 아직 연결되지 않았다면 **Import from GitLab**과 편집기의 **GitLab** 카드가 먼저 연결하라고 요청합니다. **Link to your GitLab account**를 클릭하세요. 이 경우에도 계정 설정으로 이동하며, 편집기에서 시작했다면 새 탭에서 열립니다. 그런 다음 돌아가서 다시 시작하세요.

![Link to your GitLab account 버튼이 있는 Import from GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-link-prompt.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=50ded943f918001121d5a00ef345d008)

계정이 연결되지 않았을 때의 안내

## 저장소 가져오기

GitLab 저장소에서 새 프로젝트를 만들며, 이 프로젝트는 이미 해당 저장소에 연결되어 있습니다.

**1. 가져오기 대화 상자 열기**

프로젝트 페이지에서 **New project**를 클릭한 다음 **Import from GitLab**을 클릭합니다.

![Import from GitLab이 있는 New project 메뉴](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-new-project-menu.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=4065d1b3b3e2fc5542272e38e2d01f61)

New project 메뉴

**2. 저장소 선택**

저장소 옆의 **Import to Overleaf**를 클릭합니다. 목록에는 내 저장소와 내가 속한 그룹의 저장소가 포함됩니다.

![저장소 네 개가 나열된 Import from GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-import.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=cb0ba36bfa954e101ec1ccd8dac0bca3)

내 GitLab 저장소

**3. 프로젝트 확인**

새 프로젝트가 저장소의 파일과 함께 열립니다.

![가져온 프로젝트의 파일과 컴파일된 PDF를 보여 주는 편집기](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-imported.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=a467df37fd623dffe523b5a92ebc47c1)

가져온 프로젝트

## 프로젝트를 새 저장소로 내보내기

프로젝트에서 저장소를 만들고 둘을 연결합니다. 프로젝트는 이 방법이나 가져오기로만 연결할 수 있으며, 이미 존재하는 저장소에는 연결할 수 없습니다.

**1. 편집기에서 GitLab 열기**

프로젝트를 엽니다. 왼쪽 막대에서 **Integrations**를 클릭한 다음 **GitLab**을 클릭합니다.

![GitLab 카드가 있는 Integrations 패널](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-integrations.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=df24d11afeb5bbec55a8a745fd58f47a)

Integrations 패널

**2. 저장소 정보 입력**

**Owner**를 선택합니다. 본인 또는 내가 속한 그룹 중 하나를 선택할 수 있습니다. 그룹을 선택하면 이 필드의 이름이 **Organization**이 됩니다. **Repository Name**의 초기값은 프로젝트 이름입니다. 설명은 선택 사항이며, **Private**가 기본으로 선택되어 있습니다. **Create a GitLab repository**를 클릭합니다.

![입력이 완료된 Export Project to GitLab 양식](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-export.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=ba5191a105be584e994ad663565ee511)

Export Project to GitLab

이름이 이미 사용 중이면 대화 상자에 \*\*Please check that the repository name is valid, and that you have permission to create the repository.\*\*가 표시됩니다. 이름을 바꾸고 버튼을 다시 클릭하세요.

**3. 연결 확인**

이제 대화 상자에 **This project is linked to**와 저장소 이름이 표시됩니다.

![내보내기 후의 Sync with GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-exported.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=6e18dc3c00fb9a29b3bb2f1a76cec08e)

프로젝트가 연결됨

## 동기화하기

**1. 동기화 대화 상자 열기**

연결된 프로젝트를 엽니다. 왼쪽 막대에서 **Integrations**를 클릭한 다음 **GitLab**을 클릭합니다.

**Recent commits in GitLab**에 프로젝트로 들어올 내용이 나열됩니다.

![새 커밋 하나가 나열된 Sync with GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-new-commits.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=e67529c0cad7a0cb7eafaa5f8d134b0a)

GitLab에서 대기 중인 새 커밋

**2. 변경 사항 설명**

프로젝트에서 무언가를 변경했다면 커밋 메시지 입력란이 나타납니다. 입력은 선택 사항이며, 비워 두면 커밋 이름은 `Updates from Overleaf`가 됩니다.

![커밋 메시지가 입력된 Sync with GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-commit-message.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=45677a6ea3a96235bcde72e1cdaa436a)

변경 사항의 커밋 메시지

**3. Sync 클릭**

**Sync**를 클릭합니다. GitLab의 새 커밋이 프로젝트로 들어오고, 내 변경 사항은 저장소의 기본 브랜치로 갑니다. 양쪽에서 서로 다른 부분을 변경했다면 자동으로 병합됩니다.

**4. 결과 확인**

대화 상자에 \*\*No new commits in GitLab since last merge.\*\*가 표시되고 커밋 메시지 입력란이 사라집니다. 편집기의 파일과 GitLab의 커밋이 최신 상태입니다.

![동기화 후 새 커밋이 없는 Sync with GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-done.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=74dd7ceacb36ac0289d76504e95e7ba7)

모두 동기화됨

### 양쪽에서 같은 줄이 변경된 경우

대화 상자에 변경 사항을 병합할 수 없다는 메시지와 함께, 내 변경 사항을 담은 새 브랜치 `overleaf-YYYY-MM-DD-HHMMSS`의 이름이 표시됩니다. Overleaf는 해당 브랜치로 GitLab에 병합 요청도 엽니다.

![병합 충돌 경고가 있는 Sync with GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-conflict.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=da33555666132affd667ce24b61221c9)

충돌

1. GitLab에서 또는 Git으로 해당 브랜치를 기본 브랜치에 병합합니다. 그동안 대화 상자를 닫아도 됩니다. 다시 열면 같은 메시지가 표시됩니다.
2. **I have manually merged. Continue**를 클릭합니다. 병합된 결과가 프로젝트로 들어옵니다. 브랜치를 병합하기 전에 클릭하면 대화 상자는 그대로 유지됩니다.
3. 병합할 때 삭제하지 않았다면 브랜치는 GitLab에 남습니다. 더 이상 필요하지 않으면 삭제하세요.

충돌하는 줄이 없더라도 저장소의 병합 규칙이 병합 요청을 보류하면(예: 승인이 필요한 경우) 같은 대화 상자가 나타납니다. 규칙이 허용하면 GitLab에서 병합 요청을 병합하고 **I have manually merged. Continue**를 클릭하세요. [GitLab과 동기화가 작동하는 방식](https://ayakaleaf-pro.mintlify.site/ko/on-premises/configuration/overleaf-toolkit/integrations/gitlab-synchronisation.md#how-syncing-works-with-gitlab)을 참조하세요.

## 프로젝트 연결 해제하기

프로젝트를 더 이상 동기화하지 않으려면 이 작업을 합니다.

**1. Unlink 클릭**

동기화 대화 상자에서 **Unlink**를 클릭합니다.

**2. 확인**

**Confirm**을 클릭합니다. 이 작업은 연결만 제거합니다. 경고에 언급된, 내가 소유한 저장소로의 연결은 이후에 선택할 수 있는 옵션이며 지금 일어나는 일이 아닙니다.

![연결 해제 확인을 요청하는 Sync with GitLab 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-unlink-project.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=8d7469fda58abd012ed1364f9f54005d)

연결 해제 확인

**3. 결과 확인**

이제 대화 상자에 **Export Project to GitLab**이 표시됩니다. 프로젝트와 저장소는 모두 내용을 유지합니다. 다시 동기화하려면 프로젝트를 새 저장소로 내보내거나, 저장소를 새 프로젝트로 가져오세요.

## GitLab 계정 연결 해제하기

**Account settings**의 **GitLab**에서 **Unlink**를 클릭한 다음, 대화 상자에서 다시 **Unlink**를 클릭합니다.

![Unlink GitLab Account 대화 상자](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/gitlab-sync-unlink-account.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=478ab26a1f13d3a9cb08ffc15ad64bc1)

계정 연결 해제

프로젝트는 각자의 저장소에 연결된 상태로 남습니다. 계정을 다시 연결할 때까지 동기화할 수 없습니다.

> [!NOTE]
>
> 공유 프로젝트에서 누가 무엇을 할 수 있는지는 [연결 및 동기화할 수 있는 사람](https://ayakaleaf-pro.mintlify.site/ko/on-premises/configuration/overleaf-toolkit/integrations/gitlab-synchronisation.md#who-can-link-and-sync)을 참조하세요.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.