Created
August 2, 2017 19:03
-
-
Save neilgoldman/cd7171ec0921f0a59c82596f49a78223 to your computer and use it in GitHub Desktop.
Git Add But Ignore EOL Whitespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff --ignore-space-at-eol --no-color | git apply --cached --ignore-whitespace | |
# substitute `--ignore-space-at-eol` with `-w` to ignore all modified whitespace (don't do this when committing Python of course) | |
# optionally, run `git checkout .` afterwards to remove EOL-only changes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment