Expanding on what William Pursell said, you probably ended up in vim. Save your changes and exit the editor by typing :
to enter a command, followed by wq
, then press enter. To exit vim without saving your changes do :q!
instead.
To change this default to something you’re more familiar with, you can set the EDITOR
variable to something of your choice (try nano
).
Just put export EDITOR=nano
at the end of ~/.bash_profile
(create the file if you don’t already have it) to get this behaviour for every new terminal session.
Also, you could do git commit --amend -m 'Your message here'
without a need for an editor at all.