14

Is there a command/option/filter to discard the changes (via a checkout) on all the modified files whose changes only affect whitespace?

Alternatively, staging only files with non-whitespace changes (including staging their whitespace changes) would be fine.

Richard Szalay
  • 81,010
  • 19
  • 172
  • 232

1 Answers1

19

You could:

In this solution, the order is important.

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755