颤振将LF用于windows机器上的线条端点
我已将git配置为autocrlf=true,这是Windows安装的建议。但是,当我运行颤振将LF用于windows机器上的线条端点,windows,git,flutter,dart,Windows,Git,Flutter,Dart,我已将git配置为autocrlf=true,这是Windows安装的建议。但是,当我运行flatter pub getmypubspeck.lock文件时,它会不断获取行尾的lf。是否有办法配置颤振,使其符合clrf设置 # git status On branch develop Your branch is up to date with 'origin/develop'. Changes not staged for commit: (use "git add <f
flatter pub get
mypubspeck.lock
文件时,它会不断获取行尾的lf。是否有办法配置颤振,使其符合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
#git状态
论分支机构的发展
您的分支机构的“起源/发展”是最新的。
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git restore…”放弃工作目录中的更改)
修改:pubspec.lock
未向提交添加任何更改(使用“git add”和/或“git commit-a”)
#git diff pubspec.lock
警告:在pubspec.lock中,LF将替换为CRLF。
该文件将在您的工作目录中具有其原始行结尾
这将有助于:
TL;博士
做
如OP所述,解决方案是: git add--renormalize。
听起来你需要读一下。。。。跟随你的链接有帮助。我不必使用.gittribute文件。我所要做的就是通过键入
git add--renormalize来重新规范我的回购协议。
git config core.autocrlf true