Git & GitHub/오류해결

[Git] Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch

gakko 2022. 1. 16. 14:50

 

 

Git bash를 통해서 merge를 진행하거나 pull 명령어를 사용하면

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit

라고 적힌 까만 창이 뜨는데 아무것도 적히지도 않고

esc나 q를 눌러도 나가지지 않아서 굉장히 당황스러울 것이다.

키보드를 막누르다가 잘못 건드려서 로컬저장소에 문제가 생기면 어쩌나 하는 생각도 들 것이다.

이럴 때 간단히 빠져나갈 수 있는 방법이 있다.

 

 

 

 

  해결하기!  


1.  를 누른다  ==>  i 를 누르면  Insert 모드로 바뀌어서 merge message를 입력할 수 있다.

 

2. merge 메세지를 입력한다.

 

3.  esc  키를 누른다.  ==>  Insert 모드를 취소

 

4.  :wq  를 입력한다.

 

5.  enter  키를 누르면 끝!!