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...

或者

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

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

解决办法

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

Android Studio完美解决 you are about to commit crlf line separators,warning: CRLF will be replaced by LF_第1张图片

然后像正常一样commit即可。

如果,如果commit的时候出现
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

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

你可能感兴趣的:(Android,疑难杂症,Android,Studio)