Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm in the process of 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 lock up and doesn't allow me to enter anything immediately, then when it finally does allow me to enter text it seems like it doesn't recognize git commands.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
772 views
Welcome To Ask or Share your Answers For Others

1 Answer

You're in the text editor, vim! It's a modal text editor, so you would need to:

  1. Press i to enter insert mode.
  2. Now you can type your message, as if you were in a normal (non-modal) text editor.
  3. Press esc to go back to command mode.
  4. Then type :w followed by enter to save.
  5. Finally :q followed by enter to quit.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...