Git CRLF 和 LF 行结束于 windows/linux

Git CRLF and LF line ending on windows/linux

我正在开发一个同时使用 CRLF 和 LF 行结尾的项目。我正在研究 windows。

如何发送 LD 行结束于 windows 的补丁? 谢谢

不要忘记为该文件添加 .gitattributes 规则,以便 force lf for that file

a_file text=auto eol=lf

但是关于您的发送电子邮件问题,请参阅“git am/format-patch: control format of line endings", try and use git send-email --transfer-encoding=base64,以确保所有内容都得到保留(包括 eol)