Skip to content

Instantly share code, notes, and snippets.

View josemanuelcarretero's full-sized avatar

José Manuel Carretero josemanuelcarretero

View GitHub Profile
@neilgoldman
neilgoldman / git-add-ignore-space-at-eol.sh
Created August 2, 2017 19:03
Git Add But Ignore EOL Whitespace
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