본문 바로가기
GIT

[git] Revert commit 문제 해결

by ahj 2021. 8. 23.

github을 컴퓨터랑 연동하기에 앞서 git을 잘 써보려고 유튜브에서

얄코님의 강의를 따라하고 있었다.

https://youtu.be/FXDjmsiv8fI

그러던 중 revert부분에서 terminal을 이용한 실행에서 자꾸 error가 나서 고민하다 자고 일어나서 다시 찾아봐야지 했다

 

일어나서 다시 에러를 구글링했더니 

https://stackoverflow.com/questions/52195877/how-can-i-fix-git-commit-error-waiting-for-your-editor-to-close-the-file-wi/52196507

 

How can I fix git commit error "Waiting for your editor to close the file..." with VS Code?

I'm trying just git commit and Git is giving this message: hint: Waiting for your editor to close the file... /c/Users/AGT/AppData/Local/Programs/Microsoft VS Code/bin/code: line 28: /Code.e...

stackoverflow.com

6번째 answer에서 

When Atom was a default code editor for it, there was some kind of conflict between Atom and Visual Studio Code. Opening a Terminal in Visual Studio Code and hitting git config --global core.editor "code --wait" solved the problem. Then Visual Studio Code opened a new tab each time I was doing something in the console without crashing.

 

다음과 같은 답변을 발견했다 즉, 내가 저번 생활코딩 실습 때 atom을 default code editor로 설정해놓아서 conflict가 발생한 것 같다.

git config --global core.editor "code --wait"

를 입력해줬고 해결할 수 있었다.

 

그래도 여전히 의문은 vs code로 commit_editmsg가 열리는데 어떻게 얄코님처럼 terminal로 열리게하지?

'GIT' 카테고리의 다른 글

[GIT] git commit message 수정 + 상세 과정!  (0) 2021.11.02
[GIT] .gitignore 활용  (0) 2021.10.28
[GIT] 로그인 유지  (0) 2021.10.22

댓글