简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM