HEAD 이전 커밋을 수정할 것임
$ git rebase -i HEAD~~
pick 9a54fd4 append description of the commit command
pick 0d4a808 append description of the pull command
# 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 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.
#
Sample.txt
파일을 열고 변경
$ git add sample.txt
$ git commit --amend
$ git rebase --continue
충돌을 수동으로 해결
→ git add
및 git rebase --continue
실행
git rebase --abort
를 호출하면 전체 프로세스를 되돌리고 종료하고 커밋을 성공적으로 수정할 수 있습니다.