I'm using magit 20191128.39 on Emacs 26.3 When changing a python script resulting in a new unstaged change, git/magit should ignore whitespace-differences. A git diff -w will do the trick, but I'd like to get the same result inside magit. Any hint here?


In the status buffer, open the diff menu using d.

From here you can set the -w flag by pressing w.

Many magit commands will pop these menus, when you are changing options you can save the current options as your default settings.

After enabling the -w flag, press C-xC-s to save them as your default.

After closing the menu you should see that the status buffer diffs now reflect your preference for -w, as well as future diff buffers that you can open via other means.

  • 1
    You can also change the diff arguments used in the status buffer by beginning the process with D instead of d.
    – tarsius
    Jan 21 '20 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.