Git

[Git] There was a problem with the editor 'vi' 에러 해결

Minny27 2021. 10. 14. 11:38

git commit을 진행하다가 다음과 같은 에러가 발생했습니다.

해당 문제가 종종 발생하곤 했었는데, 커밋 메시지를 모두 작성하고 메시지 작성 창을 나갈 때 보통 ':wq!'로 종료합니다.

하지만 이 이외에 허용되지 않는 키워드를 입력하고 종료하면 위와 같은 에러가 발생할 수 있습니다. ex) :q

찾아보니 vi editor 버그라고 합니다.

해당 에러를 해결해보겠습니다.

 

 

 

[Step 1] commit 된 파일 확인하기

git commit --amend

 

이전에 커밋했던 내역을 확인할 수 있습니다.

 

 

[Step 2] terminal에 해당 명령어 입력

git config --global core.editor /usr/bin/vim

 

 

 

[Step 3] 커밋 메시지 수정

git commit --amend

 

수정 후, :wq!

 

 

 

※ 참고 출처

stackexchange

 

error: There was a problem with the editor 'vi' when using it with git

I have this strange problem with using vi as the editor for git commit -a. Normal flow is: I type git commit -a, vi appears, I enter my commit message, and then :wq to save & exit from vi. This

apple.stackexchange.com