충돌 만들기
충돌이 발생하면 이를 해결하여 작업을 완료해야 합니다. 이 단계에서는 “tutorial” 및 “tutorial2 두 개의 기존 저장소를 사용하여 의도적으로 충돌을 만들 것입니다.
먼저 컴퓨터의 tutorial
디렉터리에서 sample.txt
파일을 엽니다. 아래의 굵은 텍스트를 파일에 추가하고 커밋합니다.
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
commit: Save the status of an index

다음으로, tutorial2
디렉터리에서 sample.txt
파일을 엽니다. 아래의 굵은 텍스트를 파일에 추가하고 커밋합니다.
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
pull: Obtain the content of the remote repository

이제 tutorial2
의 변경 사항을 원격 저장소로 푸시합니다.

현재 원격 저장소에서 sample.txt
파일에는 세 번째 라인인 pull: Obtain the content of the remote repository
가 포함되어 있으며 기록 로그에 커밋되었습니다.
다음으로, tutorial
저장소에서 원격 저장소로 커밋을 푸시할 것입니다.

보시다시피 Git은 충돌을 일으키고 푸시를 거부합니다.