0
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?

Git for Windows の改行設定(core.autocrlf)をインストール後に変更する方法

Posted at

Git for Windows の改行設定(core.autocrlf)をインストール後に変更する方法

Git for Windows のインストール時に、改行コードの自動変換方法を選択できる。

インストール後に改行コードの自動変換設定を変更したくなった場合の手順をメモしておく。

改行コードの自動変換の変更方法(system 設定)

  1. ターミナルを「管理者として実行」で開く
  2. git config コマンドを実行する
  • Checkout Windows-style, commit Unix-style line endings
    git config --system core.autocrlf true

  • Checkout as-is, commit Unix-style line endings
    git config --system core.autocrlf input

  • Checkout as-is, commit as-is
    git config --system core.autocrlf false

  1. 変更されたか確認する
    git config --show-origin --list

※ この設定は system(Git for Windows 全体)に対する設定であり、
global(ユーザー)や local(リポジトリ)に設定がある場合は、
そちらが優先される。

※ Git の設定優先順位は
local > global > system

0
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
0
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?