Skip to content

Commit

Permalink
git addnw to only add non-whitspace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vogler committed Sep 11, 2019
1 parent 007ead2 commit a42b6ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
jump = !/usr/local/opt/git/share/git-core/contrib/git-jump/git-jump
bwd = !git checkout HEAD^
fwd = !git log --reverse --pretty=%H master | grep -A 1 $(git rev-parse HEAD) | tail -n1 | xargs git checkout
addnw=!sh -c 'git diff -U0 -w --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -'
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
Expand Down

0 comments on commit a42b6ce

Please sign in to comment.