mirror of
https://github.com/git-tips/tips
synced 2024-11-10 05:44:14 +00:00
Add Prevent auto replacing LF with CRLF
This commit is contained in:
parent
135bd3c526
commit
a9d29fb4bc
2 changed files with 10 additions and 1 deletions
|
@ -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)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
|
@ -1224,5 +1225,10 @@ git add <path-to-submodule>
|
|||
git commit -m "submodule updated"
|
||||
```
|
||||
|
||||
## Prevent auto replacing LF with CRLF
|
||||
```sh
|
||||
git config --global core.autocrlf false
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
|
|
@ -515,5 +515,8 @@
|
|||
}, {
|
||||
"title": "Update a submodule to the latest commit",
|
||||
"tip": "cd <path-to-submodule>\ngit pull origin <branch>\ncd <root-of-your-main-project>\ngit add <path-to-submodule>\ngit commit -m \"submodule updated\""
|
||||
}
|
||||
}, {
|
||||
"title": "Prevent auto replacing LF with CRLF",
|
||||
"tip": "git config --global core.autocrlf false"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue