Cygwin + msysgit - wrong line endings sent to commit message editor

混江龙づ霸主 提交于 2019-12-08 08:12:30

问题


I'm using cygwin on Windows 7, but I've decided to work with msysgit instead of default cygwin git, because msysgit is always more recent. Everything works pretty well, except commit message editing. I'm using nano (form cygwin) and my msysgit is apparently sending an CRLF line endings to it, therefore they are displayed incorrectly in cygwin window (as ^M).

Have you got any idea how to fix this?

Do you think that combining mssygit and cygwin is good approach anyway?

Thanks!


回答1:


Do you think that combining mssygit and cygwin is good approach anyway?

I tend to avoid it, since msysgit is now much more preformant and up-to-date than cygwin regarding git. See "Git under windows: MSYS or Cygwin?".
You could consider using nano for Windows.

Check at least for both git the value of git config core.autocrlf.

Make sure it is false in both environment. See "Definitive recommendation for git autocrlf settings".



来源:https://stackoverflow.com/questions/22924140/cygwin-msysgit-wrong-line-endings-sent-to-commit-message-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!