Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My command line locks up when making a commit with GIT

Learning GIT. I tried committing a group of files, below you can see where I got to.

Asking for the commit comment/message but once I get to this screen, I am not able to input any text, everything I try, it will not let me enter any text into the window once it gets to this screen.

I am using the msysGit version with a program called Console 2 which is just a wrapper holding the msysGit command line tool

Any ideas why it would do this

Screenshot

like image 597
JasonDavis Avatar asked Jan 29 '26 07:01

JasonDavis


2 Answers

Git is using the "Vi" text editor by default. You need to add this to your Git config file:

nano ~/.gitconfig

This file may be blank if you do not have one yet. Add this line and then save using Ctrl-X:

git config core.editor "nano"

Nano is a more straightforward to use text editor for what you want to do.

If you don't have nano installed on your platform (as is the case in standard installs of Windows 7), you can optionally use Notepad++, or try this setup program to use standard Notepad instead.

like image 50
seanhodges Avatar answered Jan 30 '26 21:01

seanhodges


Try setting EDITOR to something you're used to before invoking git (or use git config to set core.editor). Or learn to use vi.

Alternatively, provide message from the command line

git commit -m 'this is the commit message'
like image 33
Michael Krelin - hacker Avatar answered Jan 30 '26 20:01

Michael Krelin - hacker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!