「LF will be replaced by CRLF the next time Git touches it」の対処法を解説します。
「LF will be replaced by CRLF the next time Git touches it」がでた背景
以下のコマンドを実行し、ワークツリーの変更内容をステージに追加しようとすると
git add.
以下の警告がでました。
warning: in the working copy of 'ディレクトリ', LF will be replaced by CRLF the next time Git touches it
![](https://ootkblog.com/wp-content/uploads/2024/03/git-lf-will-be-replaced-by-crlf-the-next-time-git-touches-it-1.png)
「LF will be replaced by CRLF the next time Git touches it」の対処法
これは、「次回触るときは改行コードをLFからCRLFに変換するよ」という意味です。
CRLFに変換させたくない場合は以下のコマンドを実行しましょう。
git config --global core.autoCRLF false
![](https://ootkblog.com/wp-content/uploads/2024/03/git-lf-will-be-replaced-by-crlf-the-next-time-git-touches-it-2.png)