Git 시작하기 13 (Pull 사용하기)
사용 버전: Atom 1.43.0 x64
운영체제: Windows 10 Home x64 1909
Git Pull을 사용해보겠습니다.
원격 저장소(Remote Repository)의 최신 정보를 로컬 저장소(Local Repository)에 불러올 때 사용합니다.
Pull은 Fetch와 Merge가 자동으로 진행됩니다.
원격 저장소에 V5 버전의 이러한 PUSH.txt가 있습니다.

로컬 저장소에 V5 버전의 이러한 PUSH.txt가 있습니다.

잘 보시면, 원격 저장소와 로컬 저장소 내용에 차이가 있습니다.
협업하는 도중에 자주 Push, Pull을 하지 않으면 생길 수 있는 상황입니다.
로컬 저장소를 원격 저장소 최신 버전에 맞추기 위해서 Pull을 합니다.

이렇게 충돌이 있다고 나옵니다.

Atom은 편리하게 GUI로 충돌된 것을 선택할 수 있게 해줍니다.
두 개를 절충해서 변경해야 한다면, 수동으로 수정을 해야 합니다.
둘 중 하나를 사용하면 된다면, Use me를 클릭하면 됩니다.
저는 원격 저장소 최신 버전에 있는 내용을 사용하겠습니다.

저장을 해줍니다.
그리고, Merge Conflicts에 있는 PUSH.txt를 Staged Changes로 보내줍니다.

Commit to master를 하고, Push를 해줍니다.

끝.
운영체제: Windows 10 Home x64 1909
Git Pull을 사용해보겠습니다.
기획: Atom으로 Git 사용하기.
원격 저장소(Remote Repository)의 최신 정보를 로컬 저장소(Local Repository)에 불러올 때 사용합니다.
Pull은 Fetch와 Merge가 자동으로 진행됩니다.
원격 저장소에 V5 버전의 이러한 PUSH.txt가 있습니다.

로컬 저장소에 V5 버전의 이러한 PUSH.txt가 있습니다.

잘 보시면, 원격 저장소와 로컬 저장소 내용에 차이가 있습니다.
협업하는 도중에 자주 Push, Pull을 하지 않으면 생길 수 있는 상황입니다.
로컬 저장소를 원격 저장소 최신 버전에 맞추기 위해서 Pull을 합니다.

이렇게 충돌이 있다고 나옵니다.

Atom은 편리하게 GUI로 충돌된 것을 선택할 수 있게 해줍니다.
두 개를 절충해서 변경해야 한다면, 수동으로 수정을 해야 합니다.
둘 중 하나를 사용하면 된다면, Use me를 클릭하면 됩니다.
저는 원격 저장소 최신 버전에 있는 내용을 사용하겠습니다.

저장을 해줍니다.
그리고, Merge Conflicts에 있는 PUSH.txt를 Staged Changes로 보내줍니다.

Commit to master를 하고, Push를 해줍니다.

끝.
카테고리: BlackSmith, Git
댓글
댓글 쓰기
궁금한 점은 댓글 달아주세요.
Comment if you have any questions.