Git – ignore whitespace

My new favourite git option:

% git diff -w

Ignore white space in diffs. Unfortunately, there doesn’t seem to be an option for just ignoring whitespace changes at the start of  line – would be handy for Python.

Tags: ,

Share This


2 Responses to Git – ignore whitespace

  1. -w is a diff option not so much a git option.
    An even better option is -b “ignore changes in amount
    of white space” which I believe is exactly what you’re looking for.

    % git diff -b

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>