Posted on

Git Please Enter Commit Message


git please enter commit message

Using terminal is cool, keeps your speed typing skills in shape, but if not for one little thing. Here comes the most hated Git command to run from terminal by me

Git Pull

This command is used to fetch code from the remote repository and merge them. Hence two git commands combined: git fetch and git merge. When you didn’t write/created any commits locally, everything just works fine – commits merged and you’re good to go

Now I’m not going to talk about cases when your local commit changed a line that’s changed on remote commit, when changes are different. This will cause a merge conflict

Enter a Commit Message

The worst thing is when merge works fine and it asks you to enter a merge commit message in this interface straight from hell

git please enter commit message

Now OK, I understand that I need to enter a commit message. Then why doesn’t my keyboard type anything? The only thing working is arrow keys

Ok, forget about the message, how do I just submit it, I don’t care already!

Nope, not so fast, buddy. Enter key doesn’t do anything nether, there’s no help written to educate about commands

Hello, there’s no UI, at least you could print some keyboard commands. No, you’re in hardcore terminal mode now!

Ok, just quit it! I don’t care about your messages!

Nope, Ctrl + C doesn’t work to quit this madness nether. At least they print out something after those attemptsgit please enter commit message

Now, why didn’t it tell me any hints about how to enable keyboard when I was trying to enter a message?

Solution

So to enable keyboard you need to press i key, now you switched to INSERT mode and finally can type some text

git please enter commit message

and to leave INSERT mode – press Esc key

And to create a commit – type :wq 

git please enter commit message

 

And congrats – you’re out of this circle of hell!

git please enter commit message

Vim

So this software you’ve just used called Vim. A high tech text editor, which gives lot’s of great feelings to beginners created in 1991. I guess there weren’t many iterations or user feedback listening

I wonder how’s is it even possible that it still exists with this user-unfriendly interface in 2017. I’m not talking about the way that it’s a terminal based, but that it doesn’t give any hints, commands nor do you even see the name of this software to google it. And how were people using it in 90s before the internet? Using a reference handbook?

 

Ok, tell me if you’ve experienced the same thing with this editor. I personally always use awesome Intellij IDEA based IDE’s and seeing this insane text editor when running some git commands from terminal just always kills me

Are you running git commands from terminal though? Or using solely IDE’s interface? Also, check this page for learning about more Vim commands, this is really useful since program itself doesn’t display heck

And definitely don’t forget to subscribe, follow me on Twitter, Facebook, G+ to get notified about the latest posts!