I am using Git. I did a pull from a remote repo and got an error message:
Please enter a commit message to explain why this merge is necessary,
especially if it merges an updated upstream into a topic branch.
I try to type a message and press Enter but nothing happens.
How do I tell Git/Terminal I am done typing in my message?
I am using Terminal on OS X.
The commit message is from Git, but it is actually the editor that keeps you from quitting. This is because Git uses your default editor, which for a variety of reasons is usually set to vi
(it might be something else on your OS, like pico
).
To write a commit message and get out of VI, follow these steps:
i
(i for insert)esc
(escape):wq
(write & quit)You can also configure Git to use another editor to avoid having to use VI (or its close cousin VIM).