Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (8 sloc) 298 Bytes
#!/usr/bin/env bash
# git-unws: remove whitespace changes from the unstaged tree
# https://til.hashrocket.com/posts/696df00135-remove-whitespace-changes-then-git-add-p
git diff -w --no-color \
| git apply --cached --ignore-whitespace \
&& git checkout -- . \
&& git reset \
&& git add -p
You can’t perform that action at this time.