## Git add everything except whitespace changes

In short, you can use this command:

> git diff -w -b | git apply --cached --ignore-whitespace

You can also add a #git alias like this

> git config --global alias.smartadd '!f() { git diff -w -b | git apply --cached --ignore-whitespace; }; f'

so, you can simply use 'git smartadd'

Reference
 
 
Back to Top