git - git --renormalize 没有效果
问题描述
我有一些以 LF 结尾的文件存储在 git 中。不知何故,它在我的工作树中转换为 CRLF。我想重新规范化它,即将它转换回LF。其他答案让我相信我可以使用git add --renormalize
,但它根本没有做任何事情:
$ git config --global core.autocrlf
input
$ git check-attr -a myfile
myfile: text: auto
$ file myfile
myfile: ASCII text, with CRLF line terminators
$ git add --renormalize myfile
$ git status
On branch master
nothing to commit, working tree clean
$ file myfile
myfile: ASCII text, with CRLF line terminators
我错过了什么?我正在使用 Git 2.28.0。
解决方案
推荐阅读
- gmail - 如何绕过电子邮件黑名单?
- android - “无法打开应用程序‘Android Studio’。255”在 Mac 上
- playframework - 在 Play Framework 中为不同的请求使用不同的端口
- javascript - Chrome 扩展 - 通知上的按钮侦听器执行多次
- angular - 防止在 mat-dialog 中检测父组件的更改
- arrays - 关于使用 Schwartzian 变换的 Perl 排序的建议
- html - 滚动时页脚不停留在底部
- python - Python regex 如何找到匹配的(子)字符串出现次数?
- php - MYSQL - 从多个查询创建单个 sql 查询
- django - Django Admin自定义用户密码没有得到散列+加盐