mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Add Whitespace Warnings as a git til.
This commit is contained in:
13
git/whitespace-warnings.md
Normal file
13
git/whitespace-warnings.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Whitespace Warnings
|
||||
|
||||
You can configure git to warn you about whitespace issues in a file when you
|
||||
diff it. This is handled by the `core.whitespace` configuration. Add the
|
||||
following to your `.gitconfig` file:
|
||||
|
||||
```
|
||||
[core]
|
||||
whitespace = warn
|
||||
```
|
||||
|
||||
By default, git will warn you of trailing whitespace at the end of a line as
|
||||
well as blank lines at the end of a file.
|
||||
Reference in New Issue
Block a user