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" + } ]