Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

github locks up mac terminal when using pull command

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?

like image 380
zero Avatar asked Dec 26 '12 20:12

zero


People also ask

How do I pull from GitHub terminal Mac?

If you only want to get the latest code from the remote repo, select Repository > Pull (⇧⌘P) from the menu bar. This merges the remote code with your local code but does not push up your changes. If you only want to push up your current state to the remote reop, select Repository > Push (⌘P).

Does GitHub work on Mac?

There are many different ways to set up Git on Mac. If you prefer using a GUI, Git offers a simple installation using the installer for Mac. On the other hand, you can install Git using the terminal with a couple of simple commands.

What happens when git pulls?

The git pull command is used to fetch and download content from a remote repository and immediately update the local repository to match that content. Merging remote upstream changes into your local repository is a common task in Git-based collaboration work flows.


2 Answers

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.
like image 172
ceyko Avatar answered Sep 18 '22 08:09

ceyko


Make it simple.

Type :wq and enter

like image 25
abbas Avatar answered Sep 21 '22 08:09

abbas