브랜치의 베이스를 옮기는 작업.
커밋 이력을 남기지 않아 커밋 히스토리가 깔끔해진다.
커밋 히스토리를 수정
git rebase -i HEAD~3
pick 9a54fd4 commit의 설명 추가
pick 0d4a808 pull 설명을 추가
# Rebase 326fc9f..0d4a808 onto d286baa
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
pick을 squash (s)로 변경하면 여러개의 커밋을 하나의 커밋으로 합칠 수 있다.
git rebase --abort