You didn’t specify what editor to use, so git took the default value - Vim. If you haven't learned it, of course you won't know how to exit Vim or Emacs. You can set it to another editor, such as nano or kate, etc. Or learn Vim.
In addition, it is not recommended to use a large amount of -m 选项。有特别的理由时才使用(比如在脚本中)。因为使用 -m 不方便输入比较长的消息,并且涉及到转义什么的。不过最重要的是,使用 -m 你就没有机会审阅你将要提交的修改了!(建议使用 git commit -v, so you can see what your modifications look like and whether there is anything missing or added. )
The interface to enter is vim, just use vim commands
Save and exit :wq
You didn’t specify what editor to use, so git took the default value - Vim. If you haven't learned it, of course you won't know how to exit Vim or Emacs. You can set it to another editor, such as nano or kate, etc. Or learn Vim.
In addition, it is not recommended to use a large amount of
-m
选项。有特别的理由时才使用(比如在脚本中)。因为使用-m
不方便输入比较长的消息,并且涉及到转义什么的。不过最重要的是,使用-m
你就没有机会审阅你将要提交的修改了!(建议使用git commit -v
, so you can see what your modifications look like and whether there is anything missing or added. )Press
esc
然后输入:x
,或者直接git commit -am "你的git注释"