1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Gitでのエラー

Last updated at Posted at 2020-05-27

プログラミング勉強日記

 2020年5月27日 Progate Lv.54

Gitでaddしようとするときのエラー処理

$ git add stylesheet.css
warning: LF will be replaced by CRLF in page3/stylesheet.css.
The file will have its original line endings in your working directory

 Gitでファイルを共有するためにaddすると、上記のよううな警告がでてきた。これを無視してもGithubで登録することはできるが、コードの中に変な文字列が挿入されてしまう。これはGitの設定で改行コードを変更しようとしている。

$ git config --global core.autoCRLF false

 上記のような処理を行うことで改行コードの変更が行われず、変な文字列も挿入されない。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?