충돌 해결
우리가 방금 만든 변경 사항을 푸시하려면 충돌을 수동으로 해결해야 합니다. 이를 위해 풀링을 실행하여 원격 저장소에서 가장 최근 변경 세트를 가져오겠습니다.
"tutorial" 디렉터리를 마우스 오른쪽 버튼으로 클릭하고 "Pull"을 선택합니다.

"OK"를 클릭합니다.

병합에 대해 알려주는 정보 상자가 보이면 읽고 "OK"를 클릭합니다.

자동 병합에 실패했다는 경고 메시지가 표시되면 "Close"를 클릭합니다.

그런 다음 이 개정판의 변경 사항을 볼 것인지 묻는 메시지가 표시됩니다. "Yes"를 클릭합니다.

TortoiseGit은 "sample.txt"에 병합 충돌이 있기 때문에 자동 병합이 실패했다고 알려줍니다. "OK"를 클릭합니다.

sample.txt
를 열면 아래와 같이 해당 파일 섹션에서 충돌을 나타내는 Git에 의해 추가된 마커가 표시됩니다.
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
<<<<<<< HEAD
commit: Save the status of an index
=======
pull: Obtain the content of the remote repository
>>>>>>> 17c860612953c0f9d88f313c8dfbf7d858e02e91
변경 사항을 모두 수락하고 마커를 제거하여 충돌을 해결할 것입니다.
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
commit: Save the status of an index
pull: Obtain the content of the remote repository
충돌을 해결하고 파일 내용이 변경되면 커밋을 시작해야 합니다.
마우스 오른쪽 버튼을 클릭하고 Git Commit -> 'main'
을 선택합니다.
병합에 대한 창이 표시됩니다. "OK"를 클릭합니다.

텍스트 편집기를 사용하여 이 병합 충돌을 수동으로 해결했기 때문에 샘플 파일을 마우스 오른쪽 버튼으로 클릭하고 "Resolved"를 선택합니다.

이 변경을 확인하는 창이 표시되면 "Yes"를 클릭합니다.

여전히 충돌하는 파일을 언급하는 커밋 메시지에 대한 경고가 표시되면 "Ignore" 또는 "Abort"를 선택합니다. 그런 다음 커밋 메시지에서 라인을 제거하거나 하단의 조언에 따라 TortoiseGit이 자동으로 "#"으로 시작하는 라인을 제거하도록 합니다. (자동으로 제거하는 것은 대부분의 다른 Git 클라이언트의 기본 동작입니다.)
이제 원격 저장소의 최신 변경 사항으로 업데이트되었습니다.

이는 두 기록이 새 병합 커밋과 성공적으로 병합되었음을 나타냅니다. 이제 병합 충돌 없이 이 변경 사항을 원격 저장소에 안전하게 푸시할 수 있습니다.
다음에 Mac 또는 명령줄에서 Git을 사용하는 방법을 배우고 싶지 않다면 브랜치 섹션으로 이동하십시오.