Github blocks mac terminal when using pull command

I am involved in learning github on mac (command line), and whenever I do git pull origin master , I get this

 # 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 

the terminal seems to be blocked and does not allow me to enter anything immediately, and then when it finally allows me to enter text, it seems that it does not recognize git commands.

Is this a bug in git or am I missing something?

+72
git github terminal
Dec 26
source share
5 answers

You are in a text editor, vim! This is a text-based text editor, so you will need to:

  • Press i to enter insert mode.
  • Now you can enter your message as if you were in a normal (non-modal) text editor.
  • Press esc to return to command mode.
  • Then type :w and then enter to save.
  • Finally :q followed by enter to exit.
+170
Dec 26
source share

Make it simple.

Enter :wq and enter

+12
Jan 20 '16 at 8:47
source share

Run this command

 git config --global core.editor "gedit" 

Add your message to this file and save it. Go back.

+1
Jun 14 '17 at 10:44 on
source share

The editor looks like vim according to your descriptions. This console just tells you to write some kind of commit message you want to make, and it is mandatory, as is it.

  • Just enter i and you will go into -- INTER -- mode, now you can write your comments.

  • After you have written, press the esc key on the keyboard and you will enter command mode. (see bottom of console)

  • Now save the changes by writing :w , and then press enter

Writing <code>: w </code> command

  • Now you can exit by typing :q , and then press enter

Writing <code>: </code> command

  • Hurrah! Finally, you will return to the main console.
+1
Nov 12 '17 at 19:53 on
source share

I fixed this problem by following these steps

  • Delete #MERGE_MSG #

    rm .git/\#MERGE_MSG#

  • Delete MERGE_HEAD

    rm .git/MERGE_HEAD

Also, I explicitly install the git editor in an editor that I am familiar with vim (you can install nano)

 `git config --global core.editor "vim"` 
0
Apr 13 '17 at 10:24 on
source share



All Articles