Line endings and whitespaces in Git
This commit is contained in:
@@ -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
|
||||||
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user