pull 명령을 사용할 때 github가 mac 터미널을 잠급니다.
나는 Mac (명령 줄)에서 github를 배우는 과정에 있으며 할 때마다 이것을 git pull origin master
얻습니다.
# 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.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
".git/MERGE_MSG" 7L, 293C
터미널이 잠긴 것처럼 보이며 즉시 아무것도 입력 할 수 없습니다. 마침내 텍스트를 입력 할 수있게되었을 때 git 명령을 인식하지 못하는 것 같습니다.
이것은 git의 버그입니까, 아니면 뭔가 빠졌습니까?
당신은 텍스트 편집기에 있습니다, vim! 그것은이다 모달 당신이 필요하므로, 텍스트 편집기 :
- 을 눌러 삽입 모드i 로 들어 갑니다 .
- 이제 일반 (모달이 아닌) 텍스트 편집기에있는 것처럼 메시지를 입력 할 수 있습니다.
- 명령 모드esc 로 돌아가려면 누릅니다 .
- 입력 한 다음
:w
다음 enter저장합니다. - 마지막으로
:q
다음 enter종료합니다.
간단하게.
유형 :wq
및enter
설명에 따르면 편집기는 vim 처럼 보입니다 . 이 콘솔은 단순히 만들고 싶은 커밋에 대한 메시지를 작성하라고 말하고 있으며, 그렇게하는 것은 필수입니다.
그냥 입력
i
하고 당신은 갈거야-- INTER --
지금 당신은 귀하의 의견을 쓸 수 있습니다 모드.쓰기를 마친 후
esc
키보드에서 키를 누르면 명령 모드로 이동합니다. ( 콘솔 하단 참조 )이제 쓰기
:w
후enter
키 를 눌러 변경 사항을 저장하십시오.
- 글을 쓰고 키
:q
를 눌러 지금 종료 할 수 있습니다.enter
- 만세! 마지막으로 메인 콘솔로 돌아 왔습니다.
이 명령 실행
git config --global core.editor "gedit"
Add your message in this file and save it. Go back pull now.
I fixed this problem by executing following steps
Remove #MERGE_MSG#
rm .git/\#MERGE_MSG#
Remove MERGE_HEAD
rm .git/MERGE_HEAD
Additionally, I explicitly set git's editor to an editor that I am familiar with vim (you can set nano)
`git config --global core.editor "vim"`
You can do git checkout --merge yourbranch
A three-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch.
Problems usually happen when we misspell something.
It is more likely this command you are interested in:
git commit -m "message"
if there was a problem, it might say something like
Your branch and 'origin/master' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
and use:
git pull
which should lead to:
Already up-to-date.
Then it is good to check:
git status
and try pushing again:
git push
More simple is first ESC and then : x (lowercase).
참고 URL : https://stackoverflow.com/questions/14046122/github-locks-up-mac-terminal-when-using-pull-command
'development' 카테고리의 다른 글
Bash의 스크립트 매개 변수 (0) | 2020.09.02 |
---|---|
맨 아래 행을 선택하는 방법은 무엇입니까? (0) | 2020.09.02 |
Android 투명 상태 표시 줄 및 작업 표시 줄 (0) | 2020.09.02 |
ASP.NET의 div에 대한 코드 숨김 파일에서 CSS 스타일을 어떻게 수정합니까? (0) | 2020.09.02 |
사용자가 필드를 떠난 후 필드 유효성 검사 (0) | 2020.09.02 |