Skip to content

Instantly share code, notes, and snippets.



Created Aug 30, 2018
What would you like to do?
git pre-commit which unstages eol whitespaces
git diff --ignore-space-at-eol -U0 --cached > foo.patch
git reset
git apply --ignore-whitespace --unidiff-zero --cached foo.patch
rm foo.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment