git pull 은 한 작업이 아니라 둘
git pull 은 git fetch + 통합 단계의 줄임말 — 기본은 merge, 선택적으로 rebase. 그 두 번째 단계가 혼란의 소굴이야. 의식 없이 git pull 하면 발산이 있을 때 local branch 에 merge commit 을 만들어 — 짧은 feature 작업엔 거의 원하는 결과가 아니야.
통합 선택 둘, 둘 다 정당해. Merge 는 필요하면 merge commit 만들어서 upstream 변경과 합쳐. history 에 발산 보존. 발산이 의미 있을 때 좋음 (장기 integration branch, release). Rebase 는 local commit 을 upstream tip 위에 다시 replay. 결과: 선형 history. 발산이 '나 작업, 동시에 누군가도 작업' 인 짧은 feature 에 좋음.
현대적 권장 default: global 에 pull.rebase = true, daily 엔 plain git pull. 선형 history 가 읽기 편하고, bisect 깨끗하고, reviewer 가 'feature 에 main merge' noise 가 아닌 한 줄 chain 봐. 진짜 merge 가 필요하면 (release branch 통합, 큰 기능 handoff) 명시적 git merge 사용. git pull 은 일상 케이스용.
알아둘 실패 모드 둘. Uncommitted 변경 + pull: 통합이 같은 파일 건드리면 Git 거부. 해결: commit (또는 stash) 먼저, pull 다음. Pull rebase 중 conflict: rebase 가 충돌 commit 마다 멈추고 해결 후 git rebase --continue 요구. rebase pull 이 옆길로 새면 git rebase --abort 가 pull 전으로 rewind, 완전 가역.