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.
Written by Steffan Harries
Related protips
1 Response
great protips i'am looking to strip out whitespace like this in git. thanks
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scm
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#