【Git】「LF will be replaced by CRLF the next time Git touches it」の対処法

当ページのリンクには広告が含まれている可能性があります。

「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

「LF will be replaced by CRLF the next time Git touches it」の対処法

これは、「次回触るときは改行コードをLFからCRLFに変換するよ」という意味です。

CRLFに変換させたくない場合は以下のコマンドを実行しましょう。

git config --global core.autoCRLF false
よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!