github - git commit operation problem
淡淡烟草味
淡淡烟草味 2017-05-02 09:43:29
0
3
678

I am a git beginner. I followed the tutorial in the book to enter commands in git bash a few days ago. When I entered $git commit, I entered an editor. Then I followed the instructions and entered commit on the first line. Then leave a blank line for the title, and then enter the description. After I finished typing, I didn’t know how to exit for subsequent operations. Ask the veteran driver for help.

Rollover scene:

淡淡烟草味
淡淡烟草味

reply all(3)
滿天的星座

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注释"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template