简体   繁体   English

如何在cygwin bash中停止git挂起

[英]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. 我的cygwin bash终端看起来好像在等待我在另一个进程中完成编辑消息,但没有编辑器启动。

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. 我假设其中一个环境变量我必须尝试使cygwin可用。

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无法找到我的编辑器导致挂起

git config --global core.editor "notepad"

Then everything works fine. 一切正常。

By setting the global editor to the windows location of vim 通过将全局编辑器设置为vim的windows位置

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. 我能够运行vim然后我可以看到还有一个锁文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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