Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I write commit message in git console?

Tags:

git

github

I am not able to write git commit message. I want to write Fixes issue #10 - one line description of changes I am not able to type anything inside git console. It does not take any keystrokes that I type in.

enter image description here

like image 690
Ice fire Avatar asked Dec 04 '22 20:12

Ice fire


1 Answers

This editor seems to be a variant of vim. Initially you are not in edit mode, to be able to input stuff press the i key to enter input mode. This allows you to type whatever you want.

After entering your message you need to hit esc to exit input mode. Then you need to issue a command to save and close, which can be done by typing :wq. : means the start of the command. w is used for saving (write) and the q let's you quit the editor.

Alternatively it is also possible to write a commit message without using this editor as the other answer explains.

like image 92
yarwest Avatar answered Dec 11 '22 10:12

yarwest