Line endings and whitespaces in Git

This commit is contained in:
2021-04-14 09:35:38 +02:00
parent b6029b392d
commit 0b062dbbfd

View File

@@ -13,3 +13,25 @@
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
diff = diff --ws-error-highlight=all diff = diff --ws-error-highlight=all
``` ```
### Line ending settings
On Windows:
```
git config core.autocrlf true
```
On Linux (should be default):
```
git config core.autocrlf input
```
## Show whitespace errors
Also works with `git diff`:
```
git show <commit-id> --ws-error-highlight=new,old
```