James Robinson
James Robinson

Reputation: 1253

How to stop git hanging on commit in cygwin bash

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

Upvotes: 5

Views: 2839

Answers (1)

James Robinson
James Robinson

Reputation: 1253

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.

Upvotes: 10

Related Questions