Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop git hanging on commit in cygwin bash

Tags:

git

bash

cygwin

Whenever I type

git commit

My cygwin bash terminal looks up as if it was waiting for me to finish editing the message in another process but no editor starts.

I get an error

"C:/Program (x86)/Git/bin/sh.exe": line 0: igncr: invalid option name

Which I assume is todo with one of the environment variables I have to try and make cygwin usable.

If I use

git commit -m "Some Message Here"

Then everything works fine

like image 234
James Robinson Avatar asked Aug 19 '13 08:08

James Robinson


1 Answers

The hanging was caused by git being unable to find my editor when I set the global editor to notepad

git config --global core.editor "notepad"

Then everything works fine.

By setting the global editor to the windows location of vim

git config --global core.editor "c:/APPS/CYGWIN/bin/vim.exe"

I was able to run vim and then I could see that there was a lock file as well.

like image 107
James Robinson Avatar answered Sep 23 '22 09:09

James Robinson