Flutter uses LF for line endings on a windows machine

Viewed 732

I have my git configured to autocrlf=true as recommended for Windows installations. However, when I run flutter pub get my pubspeck.lock file keeps getting lf for line endings. Is there a way to configure flutter so it respects the clrf settings?

# 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
2 Answers

As stated by OP, the solution was:

git add --renormalize .
Related