From: Junio C Hamano Date: Fri, 08 Aug 2008 19:27:18 GMT Subject: Re: How to fix (and find) many git-* --check errors? Message-ID: <7viqubcnop.fsf@gitster.siamese.dyndns.org> In-Reply-To: <489C40BC.8000008@sneakemail.com> "Peter Valdemar Mørch (Lists)" <4ux6as402@sneakemail.com> writes: > We have > 37000 white space "errors" in HEAD, mostly trailing > whitespace, and I'm looking for a > > $ git diff --check | git??? --whitespace=fix > > command. Starting from a clean checkout, you could do something like this: $ git reset --hard $ rm .git/index $ git diff --binary -R HEAD >P.diff $ git apply --whitespace=fix --cached