Skip to content

Instantly share code, notes, and snippets.

@cuperman
Last active October 24, 2017 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuperman/a1f0d2748b34032ea747aff0eeb56c96 to your computer and use it in GitHub Desktop.
Save cuperman/a1f0d2748b34032ea747aff0eeb56c96 to your computer and use it in GitHub Desktop.
git alias: add no whitespace
[alias]
addnw = !bash -c 'git diff -U0 -w --no-color $@ | git apply --cached --ignore-whitespace --unidiff-zero -'
@cuperman
Copy link
Author

Useful git aliases:

  • addnw - Stage non-whitespace changes to file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment