Android Studio完美解决 you are about to commit crlf line separators,warning: CRLF will be replaced by LF

简介: Android Studio完美解决 you are about to commit crlf line separators,warning: CRLF will be replaced by LF

在使用Git的时候你可能会遇到


you are about to commit crlf line separators...

1

或者


warning: CRLF will be replaced by LF in...

1

关于CRLF和LF的问题就不赘述了,关键是发现了一个简单粗暴的解决办法!!


解决办法

出现这个问题之后文件是commit不了的,打开文件,然后在右下角会有编码UTF-8什么的,对,没错,直接点击CRLF,然后选择LF即可,window反之选CRLF


image.png

然后像正常一样commit即可。


如果,如果commit的时候出现

On branch master

Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean


意思是跟之前的版本一样,也很简单,随便改一下文件内容,commit即可。


目录
相关文章
|
2天前
|
存储 Linux 开发工具
Linux手动升级替换Android Studio
【6月更文挑战第22天】
|
2天前
|
Android开发
Android Studio(2022.3.1)设置阿里云源-新旧版本
Android Studio(2022.3.1)设置阿里云源-新旧版本
10 1
|
5天前
|
XML Java 开发工具
Android Studio开发Android TV
【6月更文挑战第19天】
|
8天前
|
Android开发
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
77 1
|
5天前
|
Android开发
如何 将Android Studio升级至最新版(4.0)
如何 将Android Studio升级至最新版(4.0)
8 0
|
5天前
|
Java 开发工具 Android开发
Android Studio 导出JavaDoc文档
Android Studio 导出JavaDoc文档
9 0
|
8天前
|
开发工具 Android开发
Android studio历史版本下载
Android studio历史版本下载
27 0
|
Android开发
【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )
【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )
770 0
【错误记录】Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )
|
数据可视化 开发工具 Android开发
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
252 0
【错误记录】Android Studio 向 GitHub 提交代码报错 ( Push failed: Failed with error: Could not read | 使用命令行提交代码 )
|
1月前
|
Android开发
android studio 重新将module中的代码加入到自己项目中,报错找不到SO文件。
android studio 重新将module中的代码加入到自己项目中,报错找不到SO文件。
13 1