相关文章推荐
热心肠的香蕉  ·  git ...·  2 天前    · 
追风的鼠标  ·  【转】在'git ...·  1 周前    · 
高大的板栗  ·  合并到git后的git-svn ...·  1 周前    · 
谦和的冲锋衣  ·  valueerror query data ...·  1 年前    · 
害羞的滑板  ·  ScriptManager.AsyncPos ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am using Git via the terminal on the mac. I have encountered an annoying problem recently when I try to perform git pull . After performing git pull I receive the following error message:

Merge ssh://example.com/repository.git
# 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.

The issue is that I can't enter anything. My terminal seems stuck and there isn't anything I seem to be able to do about it. I am reasonably new to Git so it may be a simple mistake I am making.

I read here that for some people the text editor opens at this point. This certainly isn't the case at my end. It also states there that I can use the --no-edit flag to merge without a message, but even this does not seem to work at my end.

I am a bit clueless at the moment, stuck and unable to push any changes to my server.

And if you did want to insert something you would type "i" and Vim goes in to edit mode. To exit edit mode just hit "escape". – Glen Selle Nov 13, 2013 at 17:04

When you see this, an editor already opened, because you see this ;) I guess it opens vi, or a derivate of this. Google for it to find out how to use it, but it seems you prefer to change the editor instead

git config --global core.editor "emacs"

I prefer nano :)