From a9d29fb4bc18aee51047cf01c28efc39a056c220 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 31 Jul 2019 23:09:35 +0900 Subject: [PATCH] Add Prevent auto replacing LF with CRLF --- README.md | 6 ++++++ tips.json | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f18925..0e69629 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Change a branch base](#change-a-branch-base) * [Use SSH instead of HTTPs for remotes](#use-ssh-instead-of-https-for-remotes) * [Update a submodule to the latest commit](#update-a-submodule-to-the-latest-commit) +* [Prevent auto replacing LF with CRLF](#prevent-auto-replacing-lf-with-crlf) @@ -1224,5 +1225,10 @@ git add git commit -m "submodule updated" ``` +## Prevent auto replacing LF with CRLF +```sh +git config --global core.autocrlf false +``` + diff --git a/tips.json b/tips.json index 6a1a001..3400539 100644 --- a/tips.json +++ b/tips.json @@ -515,5 +515,8 @@ }, { "title": "Update a submodule to the latest commit", "tip": "cd \ngit pull origin \ncd \ngit add \ngit commit -m \"submodule updated\"" - } + }, { + "title": "Prevent auto replacing LF with CRLF", + "tip": "git config --global core.autocrlf false" + } ]