Skip to content

Instantly share code, notes, and snippets.

@cddr
Created April 1, 2014 19:43
Show Gist options
  • Save cddr/9921561 to your computer and use it in GitHub Desktop.
Save cddr/9921561 to your computer and use it in GitHub Desktop.
Fix whitespace before commit
git diff HEAD --no-color > /tmp/stage.diff
git apply -R /tmp/stage.diff
git apply --whitespace=fix /tmp/stage.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment