1
0
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:
jbranchaud
2015-08-14 16:48:42 -05:00
parent 8321952537
commit 5e057f3384
2 changed files with 14 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
- [Stashing Only Unstaged Changes](git/stashing-only-unstaged-changes.md)
- [Stashing Untracked Files](git/stashing-untracked-files.md)
- [Verbose Commit Message](git/verbose-commit-message.md)
- [Whitespace Warnings](git/whitespace-warnings.md)
### go

View 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.