我已经按照 Windows 安装推荐将 git 配置为 autocrlf=true。然而,当我运行
flutter pub get
命令时,我的 pubspeck.lock
文件的行尾符号仍是 lf。有没有一种方法可以配置 flutter 来遵守 clrf 设置?# git status
On branch develop
Your branch is up to date with 'origin/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: pubspec.lock
no changes added to commit (use "git add" and/or "git commit -a")
# git diff pubspec.lock
warning: LF will be replaced by CRLF in pubspec.lock.
The file will have its original line endings in your working directory
.gitattribute
文件。我所要做的只是通过输入git add --renormalize .
来对我的代码库进行重标准化。 - Ebsan