初投稿です。
Qiitaはよく閲覧しますが、投稿したことはありません。
この度、「開発で自分が困った事は他の方も困っているに違いない」という観点から、自分の備忘録も兼ねて投稿することにしました。
不備はあるかもしれませんが、暖かく見守ってください。
さて、本題です。
git initでリポジトリを作成して、初回のステージングを行う際に、下記のようなエラーがズラズラ出てきました。
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/Content.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/Meta.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/MetaInf.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/Mimetype.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/Settings.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/Styles.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/Thumbnails.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/OpenDocument/WriterPart.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/PDF.php.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in common/PHPExcel/Writer/PDF/Core.php.
The file will have its original line endings in your working directory
これは、Gitが自動的にLF改行コードをCRLFに変換した際に出るwarningですので、自動変換をオフにします。
git configで設定します。
$ git config --global core.autoCRLF false
これでwarningは出なくなりました。以上です。
参考:https://kmizukix.hatenadiary.org/entry/20100106/1262711140