[Git] 이미 push한 commit message를 수정하는 법

스머리·2023년 7월 20일

Git

목록 보기
1/2
post-thumbnail
아 ㅋㅋ 커밋했는데 오타있당




이미 push한 commit message를 수정하는 법

  1. VSCode 터미널에서 git revase HEAD~1 -i 입력
  2. 'pick' => 'reword' 바꾸고, 커밋 메시지 수정
  3. git push --force

에러 메시지가 뜨는 경우)

hint: Waiting for your editor to close the file... code --wait: code: command not found
error: There was a problem with the editor 'code --wait'.
  1. VSCode에서 shift + command + p
  2. Shell Command : Install 'code' command in PATH 설정
  3. 터미널에 git config --global --edit
  4. .gitconfig 파일에서 editor = code --wait -n 으로 수정

다시 맨 위 방법 순서대로 진행한다.

profile
꾸준히 나아가는 프론트엔드 개발자

1개의 댓글

comment-user-thumbnail
2023년 7월 20일

가치 있는 정보 공유해주셔서 감사합니다.

답글 달기