git add . 报错 warning: LF will be replaced by CRLF in ******.vue.

LFCRLF其实都是换行符,不同的是,LF是linux和Unix系统的换行符,CRLF是window 系统的换行符。

git提供了一个"换行符自动转换"的功能,并且这个功能是默认处于"自动模式"即开启状态的。

输入命令 :git config core.autocrlf false (仅对当前git仓库有效)

git config --global core.autocrlf false (全局有效,不设置推荐全局)

然后重新提交代码即可。

多人跨平台协作,不建议关闭。不然会容易出问题!

相关推荐
CaptainDrake2 小时前
Git 原理(提交对象)(结合图与案例)
git
CaptainDrake2 小时前
Git:Git管理
git
PassLink_3 小时前
常用 Git 命令
git
想和我重名?3 小时前
Git的基本操作
git
慕羽★15 小时前
Git常用指令整理【新手入门级】【by慕羽】
linux·git·ubuntu·gitlab·github·仓库·分布式协作
鸡c16 小时前
etcd二次封装
git·github·etcd
救救孩子把16 小时前
UGit:腾讯自研的Git客户端新宠
java·开发语言·git
星叔17 小时前
git 压栈存储当前分支修改,出栈使用保存
git
狼魂豹速19 小时前
idea2024 Safe Mode解决、配置git出现Can‘t run a Git command in the safe mode、取消受信任项目功能
git
DN金猿21 小时前
git 问题 --- fatal: detected dubious ownership in repository at
git