Last Updated: January 13, 2019
·
5.633K
· bendihossan

Remove whitespace with git

Remove whitespace from metadata like comments:
git stripspace

For stripping unnecessary whitespace in code use:
git apply --whitespace=fix

You can also pass other options to throw a warning or error when unnecessary whitespace is encountered when using git apply.

1 Response
Add your response

great protips i'am looking to strip out whitespace like this in git. thanks

over 1 year ago ·