DrMaemi / blog

1 stars 0 forks source link

[Git] rebase - commit author 수정 #197

Open DrMaemi opened 3 days ago

DrMaemi commented 3 days ago

1. 원하는 commit 수정

1.1. 대상 commit hash 확인

1.2. rebase 명령어 실행

git rebase -i ${변경할 커밋의 해시값}^
git rebase -i ${변경할 커밋의 이전 커밋의 해시값}
# 처음부터 모든 commit을 변경해야 하는 경우
git rebase -i --root

1.3. 수정할 commit 지정

1.4. commit 수정

# vim 에디터에서 직접 수정
$ git commit --amend
# 또는 옵션을 사용하여 직접 수정하기 전에 미리 수정 내용을 반영할 수 있다.
$ git commit --amend --author="$ID<$EMAIL>" -m "$COMMIT_MESSAGE"

A. 참조