【发布时间】:2017-02-23 20:46:13
【问题描述】:
在 git bash 中提交后,我去 GitHub 上验证代码,发现更改的文件如下所示:
<?php^M^Mrequire_once GLOBAL_INCLUDES . DS . "api.php";^M^Mclass MyAPI extends API {^M^Mprotected $User; // continues for a long time on this line, a 1000 line file all to the right of this --->
显然这是^M^M 的行尾问题(或者至少我认为这很明显?)
此后,我尝试使用 github 的说明对整个项目中的所有行进行规范化。我做了git config --global core.autocrlf true 无济于事。
如何在不擦除项目和创建新存储库的情况下将文件(实际上是多个文件)重新提交到 git/GitHub?
【问题讨论】:
标签: git github core.autocrlf